Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Issue 1353953002: Use a kMaxSafeInteger instead of Number.MAX_SAFE_INTEGER (Closed)

Created:
5 years, 3 months ago by aperez
Modified:
5 years, 3 months ago
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Use a kMaxSafeInteger instead of Number.MAX_SAFE_INTEGER Defines and uses a kMaxSafeInteger macro (which expands to the constant 2^53-1) instead of accessing Number.MAX_SAFE_INTEGER. This saves loading the attribute from the Number object, which is slightly faster. This also makes it clearer from reading the code that tha value being compared is constant. BUG= LOG=N Committed: https://crrev.com/3ece714df62df2c641ed15acee1736a49675add4 Cr-Commit-Position: refs/heads/master@{#30814}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Zap unneccessary GlobalNumber in runtime.js #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -4 lines) Patch
M src/macros.py View 1 chunk +3 lines, -0 lines 0 comments Download
M src/runtime.js View 1 2 chunks +1 line, -3 lines 0 comments Download
M src/v8natives.js View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 9 (3 generated)
aperez
PTAL. This contains just the Number.MAX_SAFE_INTEGER → kMaxSafeInteger bit from https://codereview.chromium.org/1348943002/
5 years, 3 months ago (2015-09-17 20:11:43 UTC) #2
adamk
lgtm once you've removed the now-unnecessary GlobalNumber var in runtime.js https://codereview.chromium.org/1353953002/diff/1/src/runtime.js File src/runtime.js (right): https://codereview.chromium.org/1353953002/diff/1/src/runtime.js#newcode36 ...
5 years, 3 months ago (2015-09-17 21:07:08 UTC) #3
aperez
Updated. https://codereview.chromium.org/1353953002/diff/1/src/runtime.js File src/runtime.js (right): https://codereview.chromium.org/1353953002/diff/1/src/runtime.js#newcode36 src/runtime.js:36: var GlobalNumber = global.Number; On 2015/09/17 21:07:08, adamk ...
5 years, 3 months ago (2015-09-17 23:33:09 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1353953002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1353953002/20001
5 years, 3 months ago (2015-09-17 23:33:29 UTC) #7
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 3 months ago (2015-09-17 23:59:54 UTC) #8
commit-bot: I haz the power
5 years, 3 months ago (2015-09-18 00:00:10 UTC) #9
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/3ece714df62df2c641ed15acee1736a49675add4
Cr-Commit-Position: refs/heads/master@{#30814}

Powered by Google App Engine
This is Rietveld 408576698