| 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 visitBitAnd(HBitAnd node); | 9 R visitBitAnd(HBitAnd node); |
| 10 R visitBitNot(HBitNot node); | 10 R visitBitNot(HBitNot node); |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 result = new HConstant.internal(constant, type); | 177 result = new HConstant.internal(constant, type); |
| 178 entry.addAtExit(result); | 178 entry.addAtExit(result); |
| 179 constants[constant] = result; | 179 constants[constant] = result; |
| 180 } else if (result.block == null) { | 180 } else if (result.block == null) { |
| 181 // The constant was not used anymore. | 181 // The constant was not used anymore. |
| 182 entry.addAtExit(result); | 182 entry.addAtExit(result); |
| 183 } | 183 } |
| 184 return result; | 184 return result; |
| 185 } | 185 } |
| 186 | 186 |
| 187 HConstant addDeferredConstant(Constant constant, PrefixElement prefix, |
| 188 Compiler compiler) { |
| 189 Constant wrapper = new DeferredConstant(constant, prefix); |
| 190 compiler.deferredLoadTask.registerConstantDeferredUse(wrapper, prefix); |
| 191 return addConstant(wrapper, compiler); |
| 192 } |
| 193 |
| 187 HConstant addConstantInt(int i, Compiler compiler) { | 194 HConstant addConstantInt(int i, Compiler compiler) { |
| 188 return addConstant(compiler.backend.constantSystem.createInt(i), compiler); | 195 return addConstant(compiler.backend.constantSystem.createInt(i), compiler); |
| 189 } | 196 } |
| 190 | 197 |
| 191 HConstant addConstantDouble(double d, Compiler compiler) { | 198 HConstant addConstantDouble(double d, Compiler compiler) { |
| 192 return addConstant( | 199 return addConstant( |
| 193 compiler.backend.constantSystem.createDouble(d), compiler); | 200 compiler.backend.constantSystem.createDouble(d), compiler); |
| 194 } | 201 } |
| 195 | 202 |
| 196 HConstant addConstantString(ast.DartString str, | 203 HConstant addConstantString(ast.DartString str, |
| (...skipping 2829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3026 class HDynamicType extends HRuntimeType { | 3033 class HDynamicType extends HRuntimeType { |
| 3027 HDynamicType(DynamicType dartType, TypeMask instructionType) | 3034 HDynamicType(DynamicType dartType, TypeMask instructionType) |
| 3028 : super(const <HInstruction>[], dartType, instructionType); | 3035 : super(const <HInstruction>[], dartType, instructionType); |
| 3029 | 3036 |
| 3030 accept(HVisitor visitor) => visitor.visitDynamicType(this); | 3037 accept(HVisitor visitor) => visitor.visitDynamicType(this); |
| 3031 | 3038 |
| 3032 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE; | 3039 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE; |
| 3033 | 3040 |
| 3034 bool typeEquals(HInstruction other) => other is HDynamicType; | 3041 bool typeEquals(HInstruction other) => other is HDynamicType; |
| 3035 } | 3042 } |
| OLD | NEW |