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: frog/leg/ssa/codegen.dart

Issue 9810006: Make continue work in do-while. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments. Created 8 years, 9 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 | « frog/leg/ssa/builder.dart ('k') | tests/co19/co19-leg.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/leg/ssa/codegen.dart
diff --git a/frog/leg/ssa/codegen.dart b/frog/leg/ssa/codegen.dart
index 0f58f29cd7a6ee9c84bf7f883acd856c5dddfdca..81a7080bce84833540f69824ab931b8aaa0d4f35 100644
--- a/frog/leg/ssa/codegen.dart
+++ b/frog/leg/ssa/codegen.dart
@@ -249,16 +249,21 @@ class SsaCodeGenerator implements HVisitor {
addIndentation();
for (LabelElement label in labeledBlockInfo.labels) {
if (labeledBlockInfo.isContinue) {
- addContinueLabel(label);
+ if (label.isContinueTarget) {
+ addContinueLabel(label);
+ buffer.add(':');
+ }
} else {
- addBreakLabel(label);
+ if (label.isBreakTarget) {
+ addBreakLabel(label);
+ buffer.add(':');
+ }
}
- buffer.add(':');
}
TargetElement target = labeledBlockInfo.target;
if (target.isSwitch) {
addImplicitBreakLabel(target);
- buffer.add(@':');
+ buffer.add(':');
}
if (labeledBlockInfo.isContinue) {
addImplicitContinueLabel(target);
@@ -297,11 +302,13 @@ class SsaCodeGenerator implements HVisitor {
}
currentBlock = node;
+
if (node.isLoopHeader()) {
// While loop will be closed by the conditional loop-branch.
// TODO(floitsch): HACK HACK HACK.
beginLoop(node);
}
+
HInstruction instruction = node.first;
while (instruction != null) {
if (instruction is HGoto || instruction is HExit || instruction is HTry) {
« no previous file with comments | « frog/leg/ssa/builder.dart ('k') | tests/co19/co19-leg.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698