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

Unified Diff: pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart

Issue 3009463002: Handle labelled continue statements (Closed)
Patch Set: Updated cf. comments Created 3 years, 4 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 | « pkg/compiler/lib/src/ssa/jump_handler.dart ('k') | tests/compiler/dart2js/jumps/data/nested_loops.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart
diff --git a/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart b/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart
index c6e14f3103591995b0212630b497131d962ae64c..7f3458d79edb90b1dee5239f95575844aa711c3f 100644
--- a/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart
+++ b/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart
@@ -557,12 +557,15 @@ class KernelJumpTarget implements JumpTargetX {
@override
LabelDefinition<ast.Node> addLabel(ast.Label label, String labelName,
- {bool isBreakTarget: false}) {
+ {bool isBreakTarget: false, bool isContinueTarget: false}) {
LabelDefinitionX result = new LabelDefinitionX(label, labelName, this);
labels.add(result);
if (isBreakTarget) {
result.setBreakTarget();
}
+ if (isContinueTarget) {
+ result.setContinueTarget();
+ }
return result;
}
@@ -575,6 +578,8 @@ class KernelJumpTarget implements JumpTargetX {
@override
bool get isSwitch => targetStatement is ir.SwitchStatement;
+ bool get isSwitchCase => targetStatement is ir.SwitchCase;
+
@override
bool get isTarget => isBreakTarget || isContinueTarget;
« no previous file with comments | « pkg/compiler/lib/src/ssa/jump_handler.dart ('k') | tests/compiler/dart2js/jumps/data/nested_loops.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698