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

Issue 6061008: Avoid double checking for IS_NUMBER by calling NonNumToNum instead of ToNumbe... (Closed)

Created:
9 years, 11 months ago by sandholm
Modified:
9 years, 7 months ago
Reviewers:
Lasse Reichstein
CC:
v8-dev
Visibility:
Public.

Description

Avoid double checking for IS_NUMBER by calling NonNumToNum instead of ToNumber when the argument is known not to be a number.

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+71 lines, -61 lines) Patch
M src/macros.py View 1 chunk +1 line, -0 lines 0 comments Download
M src/math.js View 7 chunks +21 lines, -21 lines 1 comment Download
M src/runtime.js View 9 chunks +37 lines, -30 lines 0 comments Download
M src/v8natives.js View 4 chunks +12 lines, -10 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
sandholm
9 years, 11 months ago (2011-01-05 12:56:19 UTC) #1
Lasse Reichstein
9 years, 11 months ago (2011-01-05 13:32:14 UTC) #2
LGTM

http://codereview.chromium.org/6061008/diff/1/src/math.js
File src/math.js (right):

http://codereview.chromium.org/6061008/diff/1/src/math.js#newcode47
src/math.js:47: if (!IS_NUMBER(x)) x = NonNumToNum(x);
Call it NonNumberToNumber.

Powered by Google App Engine
This is Rietveld 408576698