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

Issue 1008004: Improve Math.round(). Fix the bug in r4146. Further improve performance by ch... (Closed)

Created:
10 years, 9 months ago by Oleg Eterevsky
Modified:
9 years, 5 months ago
CC:
v8-dev
Visibility:
Public.

Description

Improve Math.round(). Fix the bug in r4146. Further improve performance by checking the exponent instead of comparing doubles. Add several tests for numbers near the limits of SMI and several tests from WebKit. Committed: http://code.google.com/p/v8/source/detail?r=4180

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 8

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+93 lines, -8 lines) Patch
M src/math.js View 1 chunk +1 line, -1 line 0 comments Download
M src/objects.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M src/objects-inl.h View 1 2 1 chunk +11 lines, -0 lines 0 comments Download
M src/runtime.h View 1 chunk +1 line, -1 line 0 comments Download
M src/runtime.cc View 1 2 1 chunk +28 lines, -6 lines 0 comments Download
M test/mjsunit/math-round.js View 1 2 1 chunk +49 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Oleg Eterevsky
10 years, 9 months ago (2010-03-17 15:46:07 UTC) #1
fschneider
LGTM. http://codereview.chromium.org/1008004/diff/5001/6002 File src/runtime.cc (right): http://codereview.chromium.org/1008004/diff/5001/6002#newcode5330 src/runtime.cc:5330: // Must be SMI. Return the argument unchanged ...
10 years, 9 months ago (2010-03-17 23:29:19 UTC) #2
Rico
Drive by comment: Maybe add a note saying that this method assumes that the callsite ...
10 years, 9 months ago (2010-03-18 05:41:10 UTC) #3
Erik Corry
I think Rico's objection could be solved with a rename eg to Runtime_RoundNumber() so that ...
10 years, 9 months ago (2010-03-18 08:21:22 UTC) #4
Oleg Eterevsky
http://codereview.chromium.org/1008004/diff/5001/6002 File src/runtime.cc (right): http://codereview.chromium.org/1008004/diff/5001/6002#newcode5330 src/runtime.cc:5330: // Must be SMI. Return the argument unchanged for ...
10 years, 9 months ago (2010-03-18 13:24:23 UTC) #5
Oleg Eterevsky
10 years, 9 months ago (2010-03-18 13:32:49 UTC) #6
On 2010/03/18 08:21:22, Erik Corry wrote:
> I think Rico's objection could be solved with a rename eg to
> Runtime_RoundNumber() so that it is clear that the input must be a number.

Done.

Powered by Google App Engine
This is Rietveld 408576698