| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 library fasta.body_builder; | 5 library fasta.body_builder; |
| 6 | 6 |
| 7 import '../fasta_codes.dart' | 7 import '../fasta_codes.dart' |
| 8 show | 8 show |
| 9 FastaMessage, | 9 FastaMessage, |
| 10 codeConstFieldWithoutInitializer, | 10 codeConstFieldWithoutInitializer, |
| (...skipping 1476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1487 exitLocalScope(); | 1487 exitLocalScope(); |
| 1488 JumpTarget continueTarget = exitContinueTarget(); | 1488 JumpTarget continueTarget = exitContinueTarget(); |
| 1489 JumpTarget breakTarget = exitBreakTarget(); | 1489 JumpTarget breakTarget = exitBreakTarget(); |
| 1490 if (continueTarget.hasUsers) { | 1490 if (continueTarget.hasUsers) { |
| 1491 body = new KernelLabeledStatement(body); | 1491 body = new KernelLabeledStatement(body); |
| 1492 continueTarget.resolveContinues(body); | 1492 continueTarget.resolveContinues(body); |
| 1493 } | 1493 } |
| 1494 Statement result = | 1494 Statement result = |
| 1495 new KernelForStatement(variables, condition, updates, body); | 1495 new KernelForStatement(variables, condition, updates, body); |
| 1496 if (begin != null) { | 1496 if (begin != null) { |
| 1497 result = new Block(<Statement>[begin, result]); | 1497 result = new KernelBlock(<Statement>[begin, result]); |
| 1498 } | 1498 } |
| 1499 if (breakTarget.hasUsers) { | 1499 if (breakTarget.hasUsers) { |
| 1500 result = new KernelLabeledStatement(result); | 1500 result = new KernelLabeledStatement(result); |
| 1501 breakTarget.resolveBreaks(result); | 1501 breakTarget.resolveBreaks(result); |
| 1502 } | 1502 } |
| 1503 exitLoopOrSwitch(result); | 1503 exitLoopOrSwitch(result); |
| 1504 } | 1504 } |
| 1505 | 1505 |
| 1506 @override | 1506 @override |
| 1507 void endAwaitExpression(Token keyword, Token endToken) { | 1507 void endAwaitExpression(Token keyword, Token endToken) { |
| (...skipping 2164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3672 if (starToken == null) { | 3672 if (starToken == null) { |
| 3673 return AsyncMarker.Async; | 3673 return AsyncMarker.Async; |
| 3674 } else { | 3674 } else { |
| 3675 assert(identical(starToken.stringValue, "*")); | 3675 assert(identical(starToken.stringValue, "*")); |
| 3676 return AsyncMarker.AsyncStar; | 3676 return AsyncMarker.AsyncStar; |
| 3677 } | 3677 } |
| 3678 } else { | 3678 } else { |
| 3679 return internalError("Unknown async modifier: $asyncToken"); | 3679 return internalError("Unknown async modifier: $asyncToken"); |
| 3680 } | 3680 } |
| 3681 } | 3681 } |
| OLD | NEW |