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

Issue 8334021: Recognize special comparisons via pattern matching on the hydrogen graph, 2nd attempt. (Closed)

Created:
9 years, 2 months ago by Sven Panne
Modified:
9 years, 2 months ago
CC:
v8-dev
Visibility:
Public.

Description

Recognize special comparisons via pattern matching on the hydrogen graph, 2nd attempt. This time, we initially leave the HTypeof instruction in the Hydrogen graph, even for the special cases. We later try to remove this instruction (and any HConstant) in the canonicalization pass, if possible. Always removing the HTypeof during the initial graph construction is wrong if e.g. it is used in an HSimulate. The removals can be generalized a bit, but this will happen in a separate CL. TEST=mjsunit/optimized-typeof.js Committed: http://code.google.com/p/v8/source/detail?r=9688

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+123 lines, -25 lines) Patch
M src/hydrogen.h View 1 chunk +2 lines, -3 lines 0 comments Download
M src/hydrogen.cc View 4 chunks +62 lines, -22 lines 2 comments Download
M src/hydrogen-instructions.h View 2 chunks +2 lines, -0 lines 0 comments Download
M src/hydrogen-instructions.cc View 1 chunk +10 lines, -0 lines 2 comments Download
A test/mjsunit/optimized-typeof.js View 1 chunk +47 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Sven Panne
9 years, 2 months ago (2011-10-18 16:05:57 UTC) #1
Kevin Millikin (Chromium)
LGTM. http://codereview.chromium.org/8334021/diff/1/src/hydrogen-instructions.cc File src/hydrogen-instructions.cc (right): http://codereview.chromium.org/8334021/diff/1/src/hydrogen-instructions.cc#newcode791 src/hydrogen-instructions.cc:791: return HasNoUses()&& !IsBlockEntry() ? NULL : this; Missing ...
9 years, 2 months ago (2011-10-19 07:24:41 UTC) #2
Sven Panne
9 years, 2 months ago (2011-10-19 07:33:32 UTC) #3
http://codereview.chromium.org/8334021/diff/1/src/hydrogen-instructions.cc
File src/hydrogen-instructions.cc (right):

http://codereview.chromium.org/8334021/diff/1/src/hydrogen-instructions.cc#ne...
src/hydrogen-instructions.cc:791: return HasNoUses()&& !IsBlockEntry() ? NULL :
this;
On 2011/10/19 07:24:41, Kevin Millikin wrote:
> Missing a space before &&, also below.

Done.

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

http://codereview.chromium.org/8334021/diff/1/src/hydrogen.cc#newcode5798
src/hydrogen.cc:5798: ast_context()->ReturnControl(instr, expr->id());
On 2011/10/19 07:24:41, Kevin Millikin wrote:
> I like the "return".  This function is (sort of) assumed to be called in tail
> position as part of translating an expression, so the return (sort of)
enforces
> that.

Done. Personally I like returning void, too, it is just like any other type
IMHO. :-) But I had discussions about this in other places in the past, so I
removed it during my various attempts to get this function right. Now it has
made its glorious comeback...

Powered by Google App Engine
This is Rietveld 408576698