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

Issue 7216008: Better codegen for '<expression> === void <literal>'. (Closed)

Created:
9 years, 6 months ago by Steven
Modified:
9 years, 6 months ago
CC:
v8-dev
Visibility:
Public.

Description

Better codegen for '<expression> === void <literal>'. Detect the pattern in both, the full compiler and crankshaft and generate direct pointer comparisons. Along the way I cleaned up 'typeof <expression> == <string literal>' comparisons as well by lifting platform independent code and checking the symmetric case. BUG=v8:1440 TEST=cctest/test-api.cc Committed: http://code.google.com/p/v8/source/detail?r=8420

Patch Set 1 #

Total comments: 10

Patch Set 2 : Applied your comments. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+231 lines, -84 lines) Patch
M src/arm/full-codegen-arm.cc View 1 3 chunks +19 lines, -23 lines 0 comments Download
M src/ast.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M src/ast.cc View 1 1 chunk +53 lines, -0 lines 2 comments Download
M src/full-codegen.h View 1 1 chunk +16 lines, -3 lines 0 comments Download
M src/full-codegen.cc View 1 1 chunk +20 lines, -0 lines 0 comments Download
M src/hydrogen.h View 1 1 chunk +5 lines, -0 lines 0 comments Download
M src/hydrogen.cc View 1 2 chunks +33 lines, -12 lines 0 comments Download
M src/ia32/full-codegen-ia32.cc View 1 3 chunks +19 lines, -23 lines 0 comments Download
M src/x64/full-codegen-x64.cc View 1 3 chunks +19 lines, -23 lines 0 comments Download
M test/cctest/test-api.cc View 1 1 chunk +43 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Steven
Hi Lasse. As discussed over VC you wanted to review this. PTAL. Thanks! -- Steven
9 years, 6 months ago (2011-06-21 10:01:28 UTC) #1
Lasse Reichstein
Hi there. Actually, I was asking for changes in the Parser, not in codegen. I'll ...
9 years, 6 months ago (2011-06-21 10:12:45 UTC) #2
fschneider
http://codereview.chromium.org/7216008/diff/1/src/arm/full-codegen-arm.cc File src/arm/full-codegen-arm.cc (right): http://codereview.chromium.org/7216008/diff/1/src/arm/full-codegen-arm.cc#newcode4034 src/arm/full-codegen-arm.cc:4034: { AccumulatorValueContext context(this); This expression should not be visited ...
9 years, 6 months ago (2011-06-21 11:36:08 UTC) #3
Steven
http://codereview.chromium.org/7216008/diff/1/src/arm/full-codegen-arm.cc File src/arm/full-codegen-arm.cc (right): http://codereview.chromium.org/7216008/diff/1/src/arm/full-codegen-arm.cc#newcode4034 src/arm/full-codegen-arm.cc:4034: { AccumulatorValueContext context(this); On 2011/06/21 11:36:08, fschneider wrote: > ...
9 years, 6 months ago (2011-06-22 10:00:53 UTC) #4
Steven
I did a rebase in between to get the merger of HCompareJsObjectEq and HCompareSymbolEq. So ...
9 years, 6 months ago (2011-06-22 10:04:43 UTC) #5
fschneider
LGTM. http://codereview.chromium.org/7216008/diff/4001/src/ast.cc File src/ast.cc (right): http://codereview.chromium.org/7216008/diff/4001/src/ast.cc#newcode369 src/ast.cc:369: bool CompareOperation::IsLiteralCompareUndefined(Expression **expr) { For consistency: Expression** expr
9 years, 6 months ago (2011-06-24 12:04:42 UTC) #6
Steven
9 years, 6 months ago (2011-06-24 14:33:29 UTC) #7
http://codereview.chromium.org/7216008/diff/4001/src/ast.cc
File src/ast.cc (right):

http://codereview.chromium.org/7216008/diff/4001/src/ast.cc#newcode369
src/ast.cc:369: bool CompareOperation::IsLiteralCompareUndefined(Expression
**expr) {
On 2011/06/24 12:04:42, fschneider wrote:
> For consistency:
> 
> Expression** expr

Done.

Powered by Google App Engine
This is Rietveld 408576698