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

Unified Diff: runtime/vm/flow_graph_builder.cc

Issue 10850016: Fix structure of WhileDo graph. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_builder.cc
diff --git a/runtime/vm/flow_graph_builder.cc b/runtime/vm/flow_graph_builder.cc
index 2ed6fe7a90f207b1907e9d3567ee98d857dd4211..80484d33d50295d9c8bc08a3d7954ea2d3b0828c 100644
--- a/runtime/vm/flow_graph_builder.cc
+++ b/runtime/vm/flow_graph_builder.cc
@@ -1042,11 +1042,11 @@ void EffectGraphVisitor::VisitCaseNode(CaseNode* node) {
// condition: <Expression>
// body: <Sequence> }
// The fragment is composed as follows:
-// a) continue-join (optional)
-// b) loop-join
-// c) [ test ] -> (body-entry-target, loop-exit-target)
-// d) body-entry-target
-// e) [ body ] -> (loop-join)
+// a) loop-join
+// b) [ test ] -> (body-entry-target, loop-exit-target)
+// c) body-entry-target
+// d) [ body ] -> (continue-join)
+// e) continue-join -> (loop-join)
// f) loop-exit-target
// g) break-join (optional)
void EffectGraphVisitor::VisitWhileNode(WhileNode* node) {
@@ -1066,8 +1066,8 @@ void EffectGraphVisitor::VisitWhileNode(WhileNode* node) {
ASSERT(lbl != NULL);
JoinEntryInstr* join = lbl->join_for_continue();
if (join != NULL) {
- Goto(join);
- exit_ = join;
+ if (for_body.is_open()) for_body.Goto(join);
+ for_body.exit_ = join;
}
TieLoop(for_test, for_body);
join = lbl->join_for_break();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698