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 part of ssa; | 5 part of ssa; |
6 | 6 |
7 abstract class HVisitor<R> { | 7 abstract class HVisitor<R> { |
8 R visitAdd(HAdd node); | 8 R visitAdd(HAdd node); |
9 R visitAwait(HAwait node); | 9 R visitAwait(HAwait node); |
10 R visitBitAnd(HBitAnd node); | 10 R visitBitAnd(HBitAnd node); |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 class HGraph { | 132 class HGraph { |
133 Element element; // Used for debug printing. | 133 Element element; // Used for debug printing. |
134 HBasicBlock entry; | 134 HBasicBlock entry; |
135 HBasicBlock exit; | 135 HBasicBlock exit; |
136 HThis thisInstruction; | 136 HThis thisInstruction; |
137 /// Receiver parameter, set for methods using interceptor calling convention. | 137 /// Receiver parameter, set for methods using interceptor calling convention. |
138 HParameterValue explicitReceiverParameter; | 138 HParameterValue explicitReceiverParameter; |
139 bool isRecursiveMethod = false; | 139 bool isRecursiveMethod = false; |
140 bool calledInLoop = false; | 140 bool calledInLoop = false; |
141 final List<HBasicBlock> blocks = <HBasicBlock>[]; | 141 final List<HBasicBlock> blocks = <HBasicBlock>[]; |
| 142 SourceInformation sourceInformation; |
142 | 143 |
143 // We canonicalize all constants used within a graph so we do not | 144 // We canonicalize all constants used within a graph so we do not |
144 // have to worry about them for global value numbering. | 145 // have to worry about them for global value numbering. |
145 Map<ConstantValue, HConstant> constants = new Map<ConstantValue, HConstant>(); | 146 Map<ConstantValue, HConstant> constants = new Map<ConstantValue, HConstant>(); |
146 | 147 |
147 HGraph() { | 148 HGraph() { |
148 entry = addNewBlock(); | 149 entry = addNewBlock(); |
149 // The exit block will be added later, so it has an id that is | 150 // The exit block will be added later, so it has an id that is |
150 // after all others in the system. | 151 // after all others in the system. |
151 exit = new HBasicBlock(); | 152 exit = new HBasicBlock(); |
(...skipping 3189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3341 class HDynamicType extends HRuntimeType { | 3342 class HDynamicType extends HRuntimeType { |
3342 HDynamicType(DynamicType dartType, TypeMask instructionType) | 3343 HDynamicType(DynamicType dartType, TypeMask instructionType) |
3343 : super(const <HInstruction>[], dartType, instructionType); | 3344 : super(const <HInstruction>[], dartType, instructionType); |
3344 | 3345 |
3345 accept(HVisitor visitor) => visitor.visitDynamicType(this); | 3346 accept(HVisitor visitor) => visitor.visitDynamicType(this); |
3346 | 3347 |
3347 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE; | 3348 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE; |
3348 | 3349 |
3349 bool typeEquals(HInstruction other) => other is HDynamicType; | 3350 bool typeEquals(HInstruction other) => other is HDynamicType; |
3350 } | 3351 } |
OLD | NEW |