| 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 887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 898 ClassWorld classWorld) { | 898 ClassWorld classWorld) { |
| 899 return classWorld.isInstantiated(cls) && | 899 return classWorld.isInstantiated(cls) && |
| 900 typeMask.containsOnly(cls); | 900 typeMask.containsOnly(cls); |
| 901 } | 901 } |
| 902 | 902 |
| 903 /// Returns `true` if [typeMask] is an instance of [cls]. | 903 /// Returns `true` if [typeMask] is an instance of [cls]. |
| 904 static bool isInstanceOf( | 904 static bool isInstanceOf( |
| 905 TypeMask typeMask, | 905 TypeMask typeMask, |
| 906 ClassElement cls, | 906 ClassElement cls, |
| 907 ClassWorld classWorld) { | 907 ClassWorld classWorld) { |
| 908 return classWorld.isImplemented(cls) && | 908 return classWorld.isInstantiated(cls) && |
| 909 typeMask.satisfies(cls, classWorld); | 909 typeMask.satisfies(cls, classWorld); |
| 910 } | 910 } |
| 911 | 911 |
| 912 bool canBePrimitive(Compiler compiler) { | 912 bool canBePrimitive(Compiler compiler) { |
| 913 return canBePrimitiveNumber(compiler) | 913 return canBePrimitiveNumber(compiler) |
| 914 || canBePrimitiveArray(compiler) | 914 || canBePrimitiveArray(compiler) |
| 915 || canBePrimitiveBoolean(compiler) | 915 || canBePrimitiveBoolean(compiler) |
| 916 || canBePrimitiveString(compiler) | 916 || canBePrimitiveString(compiler) |
| 917 || isNull(); | 917 || isNull(); |
| 918 } | 918 } |
| (...skipping 2406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3325 class HDynamicType extends HRuntimeType { | 3325 class HDynamicType extends HRuntimeType { |
| 3326 HDynamicType(DynamicType dartType, TypeMask instructionType) | 3326 HDynamicType(DynamicType dartType, TypeMask instructionType) |
| 3327 : super(const <HInstruction>[], dartType, instructionType); | 3327 : super(const <HInstruction>[], dartType, instructionType); |
| 3328 | 3328 |
| 3329 accept(HVisitor visitor) => visitor.visitDynamicType(this); | 3329 accept(HVisitor visitor) => visitor.visitDynamicType(this); |
| 3330 | 3330 |
| 3331 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE; | 3331 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE; |
| 3332 | 3332 |
| 3333 bool typeEquals(HInstruction other) => other is HDynamicType; | 3333 bool typeEquals(HInstruction other) => other is HDynamicType; |
| 3334 } | 3334 } |
| OLD | NEW |