| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import 'dart:collection'; | 5 import 'dart:collection'; |
| 6 | 6 |
| 7 import 'package:js_runtime/shared/embedded_names.dart'; | 7 import 'package:js_runtime/shared/embedded_names.dart'; |
| 8 | 8 |
| 9 import '../closure.dart'; | 9 import '../closure.dart'; |
| 10 import '../common.dart'; | 10 import '../common.dart'; |
| (...skipping 5351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5362 */ | 5362 */ |
| 5363 JumpHandler createJumpHandler(ast.Statement node, {bool isLoopJump}) { | 5363 JumpHandler createJumpHandler(ast.Statement node, {bool isLoopJump}) { |
| 5364 JumpTarget element = elements.getTargetDefinition(node); | 5364 JumpTarget element = elements.getTargetDefinition(node); |
| 5365 if (element == null || !identical(element.statement, node)) { | 5365 if (element == null || !identical(element.statement, node)) { |
| 5366 // No breaks or continues to this node. | 5366 // No breaks or continues to this node. |
| 5367 return new NullJumpHandler(reporter); | 5367 return new NullJumpHandler(reporter); |
| 5368 } | 5368 } |
| 5369 if (isLoopJump && node is ast.SwitchStatement) { | 5369 if (isLoopJump && node is ast.SwitchStatement) { |
| 5370 // Create a special jump handler for loops created for switch statements | 5370 // Create a special jump handler for loops created for switch statements |
| 5371 // with continue statements. | 5371 // with continue statements. |
| 5372 return new SwitchCaseJumpHandler(this, element, node); | 5372 return new AstSwitchCaseJumpHandler(this, element, node); |
| 5373 } | 5373 } |
| 5374 return new JumpHandler(this, element); | 5374 return new JumpHandler(this, element); |
| 5375 } | 5375 } |
| 5376 | 5376 |
| 5377 visitAsyncForIn(ast.AsyncForIn node) { | 5377 visitAsyncForIn(ast.AsyncForIn node) { |
| 5378 // The async-for is implemented with a StreamIterator. | 5378 // The async-for is implemented with a StreamIterator. |
| 5379 HInstruction streamIterator; | 5379 HInstruction streamIterator; |
| 5380 | 5380 |
| 5381 visit(node.expression); | 5381 visit(node.expression); |
| 5382 HInstruction expression = pop(); | 5382 HInstruction expression = pop(); |
| (...skipping 1389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6772 this.oldReturnLocal, | 6772 this.oldReturnLocal, |
| 6773 this.oldReturnType, | 6773 this.oldReturnType, |
| 6774 this.oldResolvedAst, | 6774 this.oldResolvedAst, |
| 6775 this.oldStack, | 6775 this.oldStack, |
| 6776 this.oldLocalsHandler, | 6776 this.oldLocalsHandler, |
| 6777 this.inTryStatement, | 6777 this.inTryStatement, |
| 6778 this.allFunctionsCalledOnce, | 6778 this.allFunctionsCalledOnce, |
| 6779 this.oldElementInferenceResults) | 6779 this.oldElementInferenceResults) |
| 6780 : super(function); | 6780 : super(function); |
| 6781 } | 6781 } |
| OLD | NEW |