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

Side by Side Diff: pkg/compiler/lib/src/ssa/nodes.dart

Issue 2581143003: implement LabeledStatement and Break in kernel (Closed)
Patch Set: fix some tests Created 4 years 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
OLDNEW
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 '../closure.dart'; 5 import '../closure.dart';
6 import '../common.dart'; 6 import '../common.dart';
7 import '../common/backend_api.dart' show BackendClasses; 7 import '../common/backend_api.dart' show BackendClasses;
8 import '../compiler.dart' show Compiler; 8 import '../compiler.dart' show Compiler;
9 import '../constants/constant_system.dart'; 9 import '../constants/constant_system.dart';
10 import '../constants/values.dart'; 10 import '../constants/values.dart';
(...skipping 2143 matching lines...) Expand 10 before | Expand all | Expand 10 after
2154 HJump(this.target) 2154 HJump(this.target)
2155 : label = null, 2155 : label = null,
2156 super(const <HInstruction>[]); 2156 super(const <HInstruction>[]);
2157 HJump.toLabel(LabelDefinition label) 2157 HJump.toLabel(LabelDefinition label)
2158 : label = label, 2158 : label = label,
2159 target = label.target, 2159 target = label.target,
2160 super(const <HInstruction>[]); 2160 super(const <HInstruction>[]);
2161 } 2161 }
2162 2162
2163 class HBreak extends HJump { 2163 class HBreak extends HJump {
2164 /** 2164 /// Signals that this is a special break instruction for the synthetic loop
2165 * Signals that this is a special break instruction for the synthetic loop 2165 /// generated for a switch statement with continue statements. See
2166 * generatedfor a switch statement with continue statements. See 2166 /// [SsaFromAstMixin.buildComplexSwitchStatement] for detail.
2167 * [SsaFromAstMixin.buildComplexSwitchStatement] for detail.
2168 */
2169 final bool breakSwitchContinueLoop; 2167 final bool breakSwitchContinueLoop;
2170 HBreak(JumpTarget target, {bool this.breakSwitchContinueLoop: false}) 2168 HBreak(JumpTarget target, {bool this.breakSwitchContinueLoop: false})
2171 : super(target); 2169 : super(target);
2172 HBreak.toLabel(LabelDefinition label) 2170 HBreak.toLabel(LabelDefinition label)
2173 : breakSwitchContinueLoop = false, 2171 : breakSwitchContinueLoop = false,
2174 super.toLabel(label); 2172 super.toLabel(label);
2175 toString() => (label != null) ? 'break ${label.labelName}' : 'break'; 2173 toString() => (label != null) ? 'break ${label.labelName}' : 'break';
2176 accept(HVisitor visitor) => visitor.visitBreak(this); 2174 accept(HVisitor visitor) => visitor.visitBreak(this);
2177 } 2175 }
2178 2176
(...skipping 1268 matching lines...) Expand 10 before | Expand all | Expand 10 after
3447 class HDynamicType extends HRuntimeType { 3445 class HDynamicType extends HRuntimeType {
3448 HDynamicType(DynamicType dartType, TypeMask instructionType) 3446 HDynamicType(DynamicType dartType, TypeMask instructionType)
3449 : super(const <HInstruction>[], dartType, instructionType); 3447 : super(const <HInstruction>[], dartType, instructionType);
3450 3448
3451 accept(HVisitor visitor) => visitor.visitDynamicType(this); 3449 accept(HVisitor visitor) => visitor.visitDynamicType(this);
3452 3450
3453 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE; 3451 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE;
3454 3452
3455 bool typeEquals(HInstruction other) => other is HDynamicType; 3453 bool typeEquals(HInstruction other) => other is HDynamicType;
3456 } 3454 }
OLDNEW
« pkg/compiler/lib/src/elements/modelx.dart ('K') | « pkg/compiler/lib/src/ssa/loop_handler.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698