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

Issue 9623005: Implement branching control flow in the non-optimizing graph compiler. (Closed)

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

Description

Implement branching control flow in the non-optimizing graph compiler. Bind a label on block entry, implement branching. R=srdjan@google.com BUG= TEST= Committed: https://code.google.com/p/dart/source/detail?r=5159

Patch Set 1 #

Total comments: 11
Unified diffs Side-by-side diffs Delta from patch set Stats (+77 lines, -11 lines) Patch
M runtime/vm/flow_graph_compiler_x64.h View 3 chunks +17 lines, -6 lines 3 comments Download
M runtime/vm/flow_graph_compiler_x64.cc View 4 chunks +60 lines, -5 lines 8 comments Download

Messages

Total messages: 3 (0 generated)
Kevin Millikin (Google)
There is a bug here, we timeout on the IsolateInterrupt test. I'm nearly positive it ...
8 years, 9 months ago (2012-03-07 16:51:27 UTC) #1
srdjan
LGTM. Yes, the backward branch stack check is the reason for failing test. Feel free ...
8 years, 9 months ago (2012-03-07 22:23:06 UTC) #2
Kevin Millikin (Google)
8 years, 9 months ago (2012-03-08 09:59:53 UTC) #3
https://chromiumcodereview.appspot.com/9623005/diff/1/runtime/vm/flow_graph_c...
File runtime/vm/flow_graph_compiler_x64.cc (right):

https://chromiumcodereview.appspot.com/9623005/diff/1/runtime/vm/flow_graph_c...
runtime/vm/flow_graph_compiler_x64.cc:295: int number =
BlockEntryInstr::cast(instr)->block_number();
On 2012/03/07 22:23:06, srdjan wrote:
> Discussed in the team and talked with Ivan: Please use AsXXX style instead of
> ::cast. The former is the DartVM style the second is V8 style. We do not use
the
> cast-like-style, and it is confusing if we use both.

Removed the static member function from class BlockEntryInstr.  Rewrote it with
As.

https://chromiumcodereview.appspot.com/9623005/diff/1/runtime/vm/flow_graph_c...
runtime/vm/flow_graph_compiler_x64.cc:394: int index = blocks_->length() -
current_block()->block_number() - 1;
On 2012/03/07 22:23:06, srdjan wrote:
> intptr_t

Done.

https://chromiumcodereview.appspot.com/9623005/diff/1/runtime/vm/flow_graph_c...
runtime/vm/flow_graph_compiler_x64.cc:395: ASSERT(index != 0);
On 2012/03/07 22:23:06, srdjan wrote:
> Maybe safer: (index > 0).

Done.

https://chromiumcodereview.appspot.com/9623005/diff/1/runtime/vm/flow_graph_c...
runtime/vm/flow_graph_compiler_x64.cc:405: 
On 2012/03/07 22:23:06, srdjan wrote:
> Empty line?

Deleted.

https://chromiumcodereview.appspot.com/9623005/diff/1/runtime/vm/flow_graph_c...
File runtime/vm/flow_graph_compiler_x64.h (right):

https://chromiumcodereview.appspot.com/9623005/diff/1/runtime/vm/flow_graph_c...
runtime/vm/flow_graph_compiler_x64.h:43: };
On 2012/03/07 22:23:06, srdjan wrote:
> ZoneAllocated objects have their destructor never called, i.e., the Label
> destructor will never be called neither, i.e., the checks in Label's
destructor
> are not being done any longer. I think those checks are important. Maybe we
> could traverse the list at the end of compilation and verify that the Labels
are
> OK.

I know, and I'm not certain this is best.  Label has DISALLOW_COPY_AND_ASSIGN so
it doesn't really work to use an embedded GrowableArray.

It seems possibly better to have a malloced array of BlockInfos---especially
depending on what else we put in this struct.

For now I've put the label asserts in ~FlowGraphCompiler.

Powered by Google App Engine
This is Rietveld 408576698