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

Issue 7046073: First steps towards better code generation for LBranch: (Closed)

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

Description

First steps towards better code generation for LBranch: * AST Expression nodes get a separate testing ID to record type info in ToBooleanStub later. This is necessary to avoid clashes with other uses of already existing IDs. * In order to avoid threading the condition expression through tons of places, TestContexts carry it now with them. Note that we will probably only need the testing ID of the expression, but having the whole thing at hand makes debugging easier. Probably we will change this later... Committed: http://code.google.com/p/v8/source/detail?r=8274

Patch Set 1 #

Total comments: 8

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -29 lines) Patch
M src/arm/full-codegen-arm.cc View 1 5 chunks +6 lines, -5 lines 0 comments Download
M src/ast.h View 1 2 chunks +3 lines, -1 line 0 comments Download
M src/full-codegen.h View 1 6 chunks +15 lines, -6 lines 0 comments Download
M src/full-codegen.cc View 1 5 chunks +14 lines, -6 lines 0 comments Download
M src/hydrogen.h View 1 3 chunks +4 lines, -0 lines 0 comments Download
M src/hydrogen.cc View 1 2 chunks +3 lines, -2 lines 0 comments Download
M src/ia32/full-codegen-ia32.cc View 1 4 chunks +5 lines, -4 lines 0 comments Download
M src/x64/full-codegen-x64.cc View 1 5 chunks +6 lines, -5 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Sven Panne
http://codereview.chromium.org/7046073/diff/1/src/hydrogen.cc File src/hydrogen.cc (right): http://codereview.chromium.org/7046073/diff/1/src/hydrogen.cc#newcode1991 src/hydrogen.cc:1991: test_context_ = new TestContext(owner, cond, if_true, if_false); Is this ...
9 years, 6 months ago (2011-06-09 10:07:56 UTC) #1
fschneider
LGTM as a first step. http://codereview.chromium.org/7046073/diff/1/src/full-codegen.cc File src/full-codegen.cc (right): http://codereview.chromium.org/7046073/diff/1/src/full-codegen.cc#newcode747 src/full-codegen.cc:747: DoTest(expr, &discard, &restore, &restore); ...
9 years, 6 months ago (2011-06-10 09:18:18 UTC) #2
Kevin Millikin (Chromium)
LGTM if you use the left subexpression ID for the left subexpression of logical && ...
9 years, 6 months ago (2011-06-10 09:35:06 UTC) #3
Sven Panne
9 years, 6 months ago (2011-06-14 08:04:48 UTC) #4
http://codereview.chromium.org/7046073/diff/1/src/arm/full-codegen-arm.cc
File src/arm/full-codegen-arm.cc (right):

http://codereview.chromium.org/7046073/diff/1/src/arm/full-codegen-arm.cc#new...
src/arm/full-codegen-arm.cc:386: codegen()->DoTest(condition_, true_label_,
false_label_, fall_through_);
On 2011/06/10 09:35:06, Kevin Millikin wrote:
> Hmmm, it might be useful to have a DoTest that takes a test context (and just
> forwards to the one with explicit arguments) for simplicity.

I think it even makes sense to have *only* such a DoTest. This has the advantage
that the fact will be very explicit that we use the value of the left operand
for *2* things: The value itself and for control.

http://codereview.chromium.org/7046073/diff/1/src/full-codegen.cc
File src/full-codegen.cc (right):

http://codereview.chromium.org/7046073/diff/1/src/full-codegen.cc#newcode747
src/full-codegen.cc:747: DoTest(expr, &discard, &restore, &restore);
On 2011/06/10 09:35:06, Kevin Millikin wrote:
> On 2011/06/10 09:18:18, fschneider wrote:
> > Shouldn't the test of the left subexpressions get the test ID
left->test_id()?
> > It has to match what the Crankshaft graph builder is doing.
> 
> I think you could do it either way (as long as they agree), but Florian's
> suggestions seems more straightforward.  Use the ID of the expression we're
> testing.

Done.

Powered by Google App Engine
This is Rietveld 408576698