Uh oh!
There was an error while loading. Please reload this page.
buffer: simplify code - #25151
Closed
BridgeAR wants to merge 1 commit into
Closed
Conversation
This refactors some code for simplicity. It also removes a call indirection used in the buffers custom inspect function.
Uh oh!
There was an error while loading. Please reload this page.
mscdex
reviewed
Dec 20, 2018
| } | ||
| const len = this.length; | ||
| if (len === 0) |
Contributor
There was a problem hiding this comment.
Why is this optimization removed?
MemberAuthor
There was a problem hiding this comment.
This will be detected below with the if (end <= start) check and it seemed an unnecessary check for the average case without hurting much in the empty buffer case.
mscdex
reviewed
Dec 20, 2018
| @@ -637,21 +638,18 @@ Buffer.prototype.toString = function toString(encoding, start, end) { | |||
| } | |||
Contributor
There was a problem hiding this comment.
Minor nit: can this also be indented correctly?
MemberAuthor
There was a problem hiding this comment.
This seems correct? It's indented by exactly two spaces.
addaleax
approved these changes
Dec 20, 2018
jasnell
approved these changes
Dec 20, 2018
shisama
approved these changes
Dec 22, 2018
MemberAuthor
trivikr
approved these changes
Dec 23, 2018
BridgeAR
commented
Dec 24, 2018
MemberAuthor
Landed in 65d8179 |
BridgeAR added a commit
to BridgeAR/node
that referenced
this pull request
Dec 24, 2018
This refactors some code for simplicity. It also removes a call indirection used in the buffers custom inspect function. PR-URL: nodejs#25151 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Masashi Hirano <shisama07@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
MylesBorins pushed a commit
that referenced
this pull request
Dec 25, 2018
This refactors some code for simplicity. It also removes a call indirection used in the buffers custom inspect function. PR-URL: #25151 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Masashi Hirano <shisama07@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Merged
MylesBorins pushed a commit
that referenced
this pull request
Dec 26, 2018
This refactors some code for simplicity. It also removes a call indirection used in the buffers custom inspect function. PR-URL: #25151 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Masashi Hirano <shisama07@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
refack pushed a commit
to refack/node
that referenced
this pull request
Jan 14, 2019
This refactors some code for simplicity. It also removes a call indirection used in the buffers custom inspect function. PR-URL: nodejs#25151 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Masashi Hirano <shisama07@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This refactors some code for simplicity. It also removes a call
indirection used in the buffers custom inspect function.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes