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; | |
6 | |
7 abstract class HType { | 5 abstract class HType { |
8 const HType(); | 6 const HType(); |
9 | 7 |
10 /** | 8 /** |
11 * Returns an [HType] that represents [type] and all types that have | 9 * Returns an [HType] that represents [type] and all types that have |
12 * [type] as supertype. | 10 * [type] as supertype. |
13 */ | 11 */ |
14 factory HType.fromBoundedType(DartType type, | 12 factory HType.fromBoundedType(DartType type, |
15 Compiler compiler, | 13 Compiler compiler, |
16 [bool canBeNull = false]) { | 14 [bool canBeNull = false]) { |
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
869 operator [](HInstruction instruction) { | 867 operator [](HInstruction instruction) { |
870 HType result = _map[instruction]; | 868 HType result = _map[instruction]; |
871 if (result == null) return instruction.guaranteedType; | 869 if (result == null) return instruction.guaranteedType; |
872 return result; | 870 return result; |
873 } | 871 } |
874 | 872 |
875 operator []=(HInstruction instruction, HType value) { | 873 operator []=(HInstruction instruction, HType value) { |
876 _map[instruction] = value; | 874 _map[instruction] = value; |
877 } | 875 } |
878 } | 876 } |
OLD | NEW |