Index: pkg/compiler/lib/src/kernel/kernel_backend_strategy.dart |
diff --git a/pkg/compiler/lib/src/kernel/kernel_backend_strategy.dart b/pkg/compiler/lib/src/kernel/kernel_backend_strategy.dart |
index 6e8bcd296de4d642905ce877fb610a42f13f11b2..3df0af277150b8dcc3f7fbe825f74e10647d2594 100644 |
--- a/pkg/compiler/lib/src/kernel/kernel_backend_strategy.dart |
+++ b/pkg/compiler/lib/src/kernel/kernel_backend_strategy.dart |
@@ -371,13 +371,13 @@ class KernelToLocalsMapImpl implements KernelToLocalsMap { |
@override |
JumpTarget getJumpTargetForForIn(ir.ForInStatement node) { |
_ensureJumpMap(node); |
- return _jumpTargetMap[node.parent]; |
+ return _jumpTargetMap[node]; |
} |
@override |
JumpTarget getJumpTargetForWhile(ir.WhileStatement node) { |
_ensureJumpMap(node); |
- return _jumpTargetMap[node.parent]; |
+ return _jumpTargetMap[node]; |
} |
@override |
@@ -414,12 +414,16 @@ class JumpVisitor extends ir.Visitor { |
bool _canBeBreakTarget(ir.TreeNode node) { |
// TODO(johnniwinther): Add more. |
- return node is ir.ForStatement; |
+ return node is ir.ForStatement || |
+ node is ir.ForInStatement || |
+ node is ir.WhileStatement; |
} |
bool _canBeContinueTarget(ir.TreeNode node) { |
// TODO(johnniwinther): Add more. |
- return node is ir.ForStatement; |
+ return node is ir.ForStatement || |
+ node is ir.ForInStatement || |
+ node is ir.WhileStatement; |
} |
@override |