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

Side by Side Diff: pkg/front_end/lib/src/fasta/kernel/body_builder.dart

Issue 2966603002: Minor fixes to for-loop type inference (Closed)
Patch Set: Created 3 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698