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

Issue 9040: * Added check for HeapNumber in the fast-cast Smi switch. (Closed)

Created:
12 years, 1 month ago by Lasse Reichstein
Modified:
9 years, 6 months ago
CC:
v8-dev
Visibility:
Public.

Description

If a HeapNumber is the incoming value, it must be converted to Smi before checking. This is not done in a fast way.

Patch Set 1 #

Patch Set 2 : Fix ofr Issue 137. Addressed reviewer comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+140 lines, -2 lines) Patch
M src/codegen-arm.cc View 1 chunk +13 lines, -0 lines 0 comments Download
M src/codegen-ia32.cc View 1 1 chunk +16 lines, -1 line 0 comments Download
M src/runtime.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/runtime.cc View 1 1 chunk +20 lines, -0 lines 0 comments Download
A test/mjsunit/regress/regress-137.js View 1 1 chunk +46 lines, -0 lines 0 comments Download
M test/mjsunit/switch.js View 1 chunk +44 lines, -1 line 0 comments Download

Messages

Total messages: 2 (0 generated)
Lasse Reichstein
Small code review. Fix of issue 137.
12 years, 1 month ago (2008-11-03 12:48:34 UTC) #1
Mads Ager (chromium)
12 years, 1 month ago (2008-11-03 13:09:46 UTC) #2
LGTM.  I think we could remove a test and a branch from the fast case, but feel
free to do that later.

http://codereview.chromium.org/9040/diff/1/3
File src/codegen-ia32.cc (right):

http://codereview.chromium.org/9040/diff/1/3#newcode1647
Line 1647: __ test(eax, Immediate(0x80000000 | kSmiTag));  // negative or not
Smi
Should probably still be kSmiTagMask.

http://codereview.chromium.org/9040/diff/1/4
File src/runtime.cc (right):

http://codereview.chromium.org/9040/diff/1/4#newcode2564
Line 2564: if (obj -> IsSmi()) {
Please remove spaces around the ->

http://codereview.chromium.org/9040/diff/1/6
File test/mjsunit/regress/regress-137.js (right):

http://codereview.chromium.org/9040/diff/1/6#newcode44
Line 44: throw "Failure: base " + base + " not recognized as Smi in range
10..15";
Please do an assert false thing here instead.

Powered by Google App Engine
This is Rietveld 408576698