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

Unified Diff: frog/leg/ssa/builder.dart

Issue 9601009: Change labeled statement to use visitSubGraph for its body instead of marking its "exit block" spec… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Changed approach to avoiding bad recursion. Created 8 years, 10 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 | frog/leg/ssa/codegen.dart » ('j') | frog/leg/ssa/codegen.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/leg/ssa/builder.dart
diff --git a/frog/leg/ssa/builder.dart b/frog/leg/ssa/builder.dart
index c75d86b755013ebb3f999eddf7680a956565e96c..477386ffdf55510aa5ef958c1dc04750c5d278c6 100644
--- a/frog/leg/ssa/builder.dart
+++ b/frog/leg/ssa/builder.dart
@@ -2234,6 +2234,7 @@ class SsaBuilder implements Visitor {
goto(current, entryBlock);
open(entryBlock);
visit(body);
+ SubGraph bodyGraph = new SubGraph(entryBlock, lastOpenedBlock);
if (isAborted()) {
compiler.unimplemented(
"SsaBuilder for labeled statement with aborting body", node: node);
@@ -2256,15 +2257,9 @@ class SsaBuilder implements Visitor {
if (hasBreak) {
// There was at least one reachable break, so the label is needed.
HLabeledBlockInformation blockInfo =
- new HLabeledBlockInformation(entryBlock, current,
- handler.labels());
+ new HLabeledBlockInformation(bodyGraph, joinBlock, handler.labels());
handler.close();
- // Mark both entry and exit with the information. You can
- // tell which one is which by comparing with blockInfo.start/end.
- // It doesn't matter which merge block we use, they won't be generating
- // any code, so put the end-marker on the last join block.
entryBlock.labeledBlockInformation = blockInfo;
- current.labeledBlockInformation = blockInfo;
}
}
« no previous file with comments | « no previous file | frog/leg/ssa/codegen.dart » ('j') | frog/leg/ssa/codegen.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698