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

Issue 7033008: Fix error in postfix ++ in Crankshaft. (Closed)

Created:
9 years, 7 months ago by William Hesse
Modified:
9 years, 7 months ago
Reviewers:
fschneider
CC:
v8-dev
Visibility:
Public.

Description

Fix error in postfix ++ in Crankshaft. Add HForceRepresentation, to represent the implicit ToNumber applied to the input of a count operation. BUG=v8:1389 TEST= Committed: http://code.google.com/p/v8/source/detail?r=7913

Patch Set 1 #

Total comments: 4

Patch Set 2 : add test #

Patch Set 3 : Fix typo, remove unneeded code. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+148 lines, -51 lines) Patch
M src/arm/lithium-arm.cc View 1 1 chunk +8 lines, -0 lines 0 comments Download
M src/hydrogen.h View 1 chunk +1 line, -2 lines 0 comments Download
M src/hydrogen.cc View 1 2 8 chunks +54 lines, -49 lines 0 comments Download
M src/hydrogen-instructions.h View 2 chunks +20 lines, -0 lines 0 comments Download
M src/hydrogen-instructions.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M src/ia32/lithium-ia32.cc View 1 1 chunk +8 lines, -0 lines 0 comments Download
M src/x64/lithium-x64.cc View 1 1 chunk +8 lines, -0 lines 0 comments Download
A test/mjsunit/regress/regress-1389.js View 1 2 1 chunk +42 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
William Hesse
http://codereview.chromium.org/7033008/diff/1/src/hydrogen.cc File src/hydrogen.cc (right): http://codereview.chromium.org/7033008/diff/1/src/hydrogen.cc#newcode1791 src/hydrogen.cc:1791: use_value->DeleteAndReplaceWith(new_value); We should be able to delete this copy.
9 years, 7 months ago (2011-05-16 16:19:48 UTC) #1
fschneider
9 years, 7 months ago (2011-05-17 11:03:15 UTC) #2
LGTM.

http://codereview.chromium.org/7033008/diff/1/src/hydrogen.cc
File src/hydrogen.cc (right):

http://codereview.chromium.org/7033008/diff/1/src/hydrogen.cc#newcode1791
src/hydrogen.cc:1791: use_value->DeleteAndReplaceWith(new_value);
On 2011/05/16 16:19:48, William Hesse wrote:
> We should be able to delete this copy.

Yes, I think you can do it below and you only need to to DeleteAndReplaceWith
once.

http://codereview.chromium.org/7033008/diff/1/src/hydrogen.cc#newcode4724
src/hydrogen.cc:4724: // If we need to return ToNumber(input), we force a
representation change.
maybe explain why:

// to have get a HValue for the return value here and the actual conversion is
inserted later.

http://codereview.chromium.org/7033008/diff/1/src/hydrogen.cc#newcode4761
src/hydrogen.cc:4761: HValue* input = NULL;  // The input to the count
operation, after ToNumber.
just say ToNumber(input)?

Powered by Google App Engine
This is Rietveld 408576698