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

Issue 10316005: Automatically assign temporary indices to definitions in the IL. (Closed)

Created:
8 years, 7 months ago by Kevin Millikin (Google)
Modified:
8 years, 7 months ago
Reviewers:
srdjan
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Automatically assign temporary indices to definitions in the IL. When added to the graph, automatically assign a temporary index (== stack height) to definitions. R=srdjan@google.com BUG= TEST= Committed: https://code.google.com/p/dart/source/detail?r=7269

Patch Set 1 #

Total comments: 6

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+387 lines, -327 lines) Patch
M runtime/vm/flow_graph_builder.h View 1 5 chunks +9 lines, -19 lines 0 comments Download
M runtime/vm/flow_graph_builder.cc View 64 chunks +89 lines, -178 lines 0 comments Download
M runtime/vm/intermediate_language.h View 37 chunks +189 lines, -130 lines 0 comments Download
M runtime/vm/intermediate_language.cc View 1 chunk +100 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Kevin Millikin (Google)
This requires incrementing the stack height for every definition and decrementing for every use. The ...
8 years, 7 months ago (2012-05-02 13:53:25 UTC) #1
srdjan
LGTM with comments/questions http://codereview.chromium.org/10316005/diff/1/runtime/vm/flow_graph_builder.cc File runtime/vm/flow_graph_builder.cc (right): http://codereview.chromium.org/10316005/diff/1/runtime/vm/flow_graph_builder.cc#newcode98 runtime/vm/flow_graph_builder.cc:98: exit_ = false_exit; // May be ...
8 years, 7 months ago (2012-05-02 22:07:32 UTC) #2
Kevin Millikin (Google)
8 years, 7 months ago (2012-05-03 08:26:23 UTC) #3
I'll commit as is and we can talk about any better solutions than the templates.

http://codereview.chromium.org/10316005/diff/1/runtime/vm/flow_graph_builder.cc
File runtime/vm/flow_graph_builder.cc (right):

http://codereview.chromium.org/10316005/diff/1/runtime/vm/flow_graph_builder....
runtime/vm/flow_graph_builder.cc:98: exit_ = false_exit;  // May be NULL.
On 2012/05/02 22:07:32, srdjan wrote:
> When is it possible to have both true and false exits null?

An 'if' that returns in both branches, for instance.

http://codereview.chromium.org/10316005/diff/1/runtime/vm/flow_graph_builder.h
File runtime/vm/flow_graph_builder.h (right):

http://codereview.chromium.org/10316005/diff/1/runtime/vm/flow_graph_builder....
runtime/vm/flow_graph_builder.h:176: void DeallocateTempIndex(intptr_t n = 1) {
On 2012/05/02 22:07:32, srdjan wrote:
> Remove default value, please.

Yikes, I meant to do that.  Thanks.

http://codereview.chromium.org/10316005/diff/1/runtime/vm/intermediate_langua...
File runtime/vm/intermediate_language.h (right):

http://codereview.chromium.org/10316005/diff/1/runtime/vm/intermediate_langua...
runtime/vm/intermediate_language.h:98: 
On 2012/05/02 22:07:32, srdjan wrote:
> I think templates below are nifty but an overkill for what you are attempting
to
> do. Could you please explain the advantage when compared to conventional
> solution (an input_number field in computation, and appropriate accessors).

The primary advantage is that it eliminates a lot of boilerplate in the IL
classes.  We'll eventually want to be able to iterate all inputs, for example,
and the templates are (one way) to eliminate writing per-class iteration code.

Powered by Google App Engine
This is Rietveld 408576698