Chromium Code Reviews| Index: pkg/compiler/lib/src/js_model/locals.dart |
| diff --git a/pkg/compiler/lib/src/js_model/locals.dart b/pkg/compiler/lib/src/js_model/locals.dart |
| index a79037a6dafd542530dc1c04c95a039af44e85f7..538fe733e889cd1708e2e135c7c63ff6506734fd 100644 |
| --- a/pkg/compiler/lib/src/js_model/locals.dart |
| +++ b/pkg/compiler/lib/src/js_model/locals.dart |
| @@ -91,7 +91,7 @@ class KernelToLocalsMapImpl implements KernelToLocalsMap { |
| @override |
| JumpTarget getJumpTargetForDo(ir.DoStatement node) { |
| _ensureJumpMap(node); |
| - return _jumpTargetMap[node.parent]; |
| + return _jumpTargetMap[node]; |
| } |
| @override |
| @@ -103,8 +103,7 @@ class KernelToLocalsMapImpl implements KernelToLocalsMap { |
| @override |
| JumpTarget getJumpTargetForSwitch(ir.SwitchStatement node) { |
| _ensureJumpMap(node); |
| - throw new UnimplementedError( |
| - 'KernelToLocalsMapImpl.getJumpTargetForSwitch'); |
| + return _jumpTargetMap[node]; |
| } |
| @override |
| @@ -161,14 +160,17 @@ class JumpVisitor extends ir.Visitor { |
| // TODO(johnniwinther): Add more. |
|
Siggi Cherem (dart-lang)
2017/06/30 18:16:21
anything more to add for break?
Johnni Winther
2017/06/30 19:16:55
No. Removed.
|
| return node is ir.ForStatement || |
| node is ir.ForInStatement || |
| - node is ir.WhileStatement; |
| + node is ir.WhileStatement || |
| + node is ir.DoStatement || |
|
Siggi Cherem (dart-lang)
2017/06/30 18:16:21
I thought you said there was more to this than jus
Johnni Winther
2017/06/30 19:16:55
The problem was that continue in do requires a lab
|
| + node is ir.SwitchStatement; |
| } |
| bool _canBeContinueTarget(ir.TreeNode node) { |
| // TODO(johnniwinther): Add more. |
|
Siggi Cherem (dart-lang)
2017/06/30 18:16:21
here we are missing continue to switch-case, corre
Johnni Winther
2017/06/30 19:16:55
That's the only one.
|
| return node is ir.ForStatement || |
| node is ir.ForInStatement || |
| - node is ir.WhileStatement; |
| + node is ir.WhileStatement || |
| + node is ir.DoStatement; |
| } |
| @override |