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

Side by Side Diff: pkg/compiler/lib/src/kernel/kernel_visitor.dart

Issue 2644293004: Fix labeled break statements. (Closed)
Patch Set: . Created 3 years, 11 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/compiler/lib/src/ssa/kernel_ast_adapter.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.md file. 3 // BSD-style license that can be found in the LICENSE.md file.
4 4
5 import 'package:kernel/ast.dart' as ir; 5 import 'package:kernel/ast.dart' as ir;
6 import 'package:kernel/frontend/accessors.dart' 6 import 'package:kernel/frontend/accessors.dart'
7 show 7 show
8 Accessor, 8 Accessor,
9 IndexAccessor, 9 IndexAccessor,
10 NullAwarePropertyAccessor, 10 NullAwarePropertyAccessor,
(...skipping 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after
1102 return internalError(node, "TypeVariable"); 1102 return internalError(node, "TypeVariable");
1103 } 1103 }
1104 1104
1105 @override 1105 @override
1106 ir.Statement visitWhile(While node) { 1106 ir.Statement visitWhile(While node) {
1107 ir.Expression condition = visitForValue(node.condition); 1107 ir.Expression condition = visitForValue(node.condition);
1108 JumpTarget jumpTarget = elements.getTargetDefinition(node); 1108 JumpTarget jumpTarget = elements.getTargetDefinition(node);
1109 ir.Statement body = 1109 ir.Statement body =
1110 buildContinueTarget(buildStatementInBlock(node.body), node, jumpTarget); 1110 buildContinueTarget(buildStatementInBlock(node.body), node, jumpTarget);
1111 return buildBreakTarget( 1111 return buildBreakTarget(
1112 associateNode(new ir.WhileStatement(condition, body), node), 1112 new ir.WhileStatement(condition, body),
1113 node, 1113 node,
1114 jumpTarget); 1114 jumpTarget);
1115 } 1115 }
1116 1116
1117 @override 1117 @override
1118 ir.YieldStatement visitYield(Yield node) { 1118 ir.YieldStatement visitYield(Yield node) {
1119 return new ir.YieldStatement(visitForValue(node.expression), 1119 return new ir.YieldStatement(visitForValue(node.expression),
1120 isYieldStar: node.hasStar); 1120 isYieldStar: node.hasStar);
1121 } 1121 }
1122 1122
(...skipping 1736 matching lines...) Expand 10 before | Expand all | Expand 10 after
2859 : this(null, true, node, initializers); 2859 : this(null, true, node, initializers);
2860 2860
2861 accept(ir.Visitor v) => throw "unsupported"; 2861 accept(ir.Visitor v) => throw "unsupported";
2862 2862
2863 visitChildren(ir.Visitor v) => throw "unsupported"; 2863 visitChildren(ir.Visitor v) => throw "unsupported";
2864 2864
2865 String toString() { 2865 String toString() {
2866 return "IrFunction($kind, $isConstructor, $node, $initializers)"; 2866 return "IrFunction($kind, $isConstructor, $node, $initializers)";
2867 } 2867 }
2868 } 2868 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698