FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

buffer: fix value check for writeUInt{B,L}E by trevnorris · Pull Request #3500 · nodejs/node · GitHub

/ node Public

buffer: fix value check for writeUInt{B,L}E - #3500

Closed
trevnorris wants to merge 1 commit into
nodejs:masterfrom
trevnorris:buf-fix-uint-write
Closed

buffer: fix value check for writeUInt{B,L}E#3500
trevnorris wants to merge 1 commit into
nodejs:masterfrom
trevnorris:buf-fix-uint-write

Conversation

Copy link
Copy Markdown
Contributor

Comment thread lib/buffer.js Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think Crankshaft and TurboFan are smart enough to move the Math.pow() call to the use site but the baseline compiler probably isn't, which would mean an extra Math.pow() call in the (unoptimized) common case.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

oh whoops. I just moved it b/c it didn't fit in 80 chars, but brain farted that i moved it outside the if. will fix.

mscdex added the buffer Issues and PRs related to the buffer subsystem. label Oct 23, 2015

jasnell commented Oct 26, 2015

Copy link
Copy Markdown
Member

@trevnorris ... would you want this in v4.x?

Copy link
Copy Markdown
Contributor Author

@jasnell bug fix, so I think so.

Copy link
Copy Markdown
Contributor Author

@bnoordhuis Addressed comments.

New CI: https://ci.nodejs.org/job/node-test-pull-request/620/

Copy link
Copy Markdown
Contributor Author

Two unrelated failures. Everything else looks good.

trevnorris force-pushed the buf-fix-uint-write branch 2 times, most recently from 540da8d to 67d4e96 Compare October 26, 2015 20:10

Copy link
Copy Markdown
Member

LGTM. Consider adding tests for byteLength > 1.

Copy link
Copy Markdown
Contributor Author

Copy link
Copy Markdown
Member

I only see tests for byteLength == 0 and 1 or am I missing something?

trevnorris added a commit that referenced this pull request Oct 26, 2015
Fixes: #3497
PR-URL: #3500
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

Copy link
Copy Markdown
Contributor Author

Thanks for the review. Landed in 3308e5e.

trevnorris closed this Oct 26, 2015
trevnorris deleted the buf-fix-uint-write branch October 26, 2015 20:59
trevnorris added a commit that referenced this pull request Oct 26, 2015
Fixes: #3497
PR-URL: #3500
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
rvagg mentioned this pull request Oct 27, 2015
trevnorris added a commit that referenced this pull request Oct 28, 2015
Fixes: #3497
PR-URL: #3500
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

jasnell commented Oct 28, 2015

Copy link
Copy Markdown
Member

Landed in v4.x-staging bc2120c

trevnorris added a commit that referenced this pull request Oct 29, 2015
Fixes: #3497
PR-URL: #3500
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
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 free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

buffer Issues and PRs related to the buffer subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL