| 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 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1305 HInstruction current = this.next; | 1305 HInstruction current = this.next; |
| 1306 while (current != null) { | 1306 while (current != null) { |
| 1307 if (current == other) return true; | 1307 if (current == other) return true; |
| 1308 current = current.next; | 1308 current = current.next; |
| 1309 } | 1309 } |
| 1310 return false; | 1310 return false; |
| 1311 } | 1311 } |
| 1312 | 1312 |
| 1313 HInstruction convertType(Compiler compiler, DartType type, int kind) { | 1313 HInstruction convertType(Compiler compiler, DartType type, int kind) { |
| 1314 if (type == null) return this; | 1314 if (type == null) return this; |
| 1315 type = type.unalias(compiler); | 1315 type = type.unalias(compiler.resolution); |
| 1316 // Only the builder knows how to create [HTypeConversion] | 1316 // Only the builder knows how to create [HTypeConversion] |
| 1317 // instructions with generics. It has the generic type context | 1317 // instructions with generics. It has the generic type context |
| 1318 // available. | 1318 // available. |
| 1319 assert(type.kind != TypeKind.TYPE_VARIABLE); | 1319 assert(type.kind != TypeKind.TYPE_VARIABLE); |
| 1320 assert(type.treatAsRaw || type.isFunctionType); | 1320 assert(type.treatAsRaw || type.isFunctionType); |
| 1321 if (type.isDynamic) return this; | 1321 if (type.isDynamic) return this; |
| 1322 // The type element is either a class or the void element. | 1322 // The type element is either a class or the void element. |
| 1323 Element element = type.element; | 1323 Element element = type.element; |
| 1324 if (identical(element, compiler.objectClass)) return this; | 1324 if (identical(element, compiler.objectClass)) return this; |
| 1325 JavaScriptBackend backend = compiler.backend; | 1325 JavaScriptBackend backend = compiler.backend; |
| (...skipping 2001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3327 class HDynamicType extends HRuntimeType { | 3327 class HDynamicType extends HRuntimeType { |
| 3328 HDynamicType(DynamicType dartType, TypeMask instructionType) | 3328 HDynamicType(DynamicType dartType, TypeMask instructionType) |
| 3329 : super(const <HInstruction>[], dartType, instructionType); | 3329 : super(const <HInstruction>[], dartType, instructionType); |
| 3330 | 3330 |
| 3331 accept(HVisitor visitor) => visitor.visitDynamicType(this); | 3331 accept(HVisitor visitor) => visitor.visitDynamicType(this); |
| 3332 | 3332 |
| 3333 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE; | 3333 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE; |
| 3334 | 3334 |
| 3335 bool typeEquals(HInstruction other) => other is HDynamicType; | 3335 bool typeEquals(HInstruction other) => other is HDynamicType; |
| 3336 } | 3336 } |
| OLD | NEW |