OLD | NEW |
1 // TODO(sigmund): rename universe => world | 1 // TODO(sigmund): rename universe => world |
2 /// Describes individual features that may be seen in a program. Most features | 2 /// Describes individual features that may be seen in a program. Most features |
3 /// can be described only by name using the [Feature] enum, some features are | 3 /// can be described only by name using the [Feature] enum, some features are |
4 /// expressed including details on how they are used. For example, whether a | 4 /// expressed including details on how they are used. For example, whether a |
5 /// list literal was constant or empty. | 5 /// list literal was constant or empty. |
6 /// | 6 /// |
7 /// The use of these features is typically discovered in an early phase of the | 7 /// The use of these features is typically discovered in an early phase of the |
8 /// compilation pipeline, for example during resolution. | 8 /// compilation pipeline, for example during resolution. |
9 library compiler.universe.feature; | 9 library compiler.universe.feature; |
10 | 10 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 /// A method with a `sync*` body modifier. | 71 /// A method with a `sync*` body modifier. |
72 SYNC_STAR, | 72 SYNC_STAR, |
73 | 73 |
74 /// A throw expression. | 74 /// A throw expression. |
75 THROW_EXPRESSION, | 75 THROW_EXPRESSION, |
76 | 76 |
77 /// An implicit throw of a `NoSuchMethodError`, like calling an unresolved | 77 /// An implicit throw of a `NoSuchMethodError`, like calling an unresolved |
78 /// static method. | 78 /// static method. |
79 THROW_NO_SUCH_METHOD, | 79 THROW_NO_SUCH_METHOD, |
80 | 80 |
81 /// An implicit throw of a runtime error, like | 81 /// An implicit throw of a runtime error, like in a runtime type check. |
82 THROW_RUNTIME_ERROR, | 82 THROW_RUNTIME_ERROR, |
83 | 83 |
| 84 /// An implicit throw of a `UnsupportedError`, like calling `new |
| 85 /// bool.fromEnvironment`. |
| 86 THROW_UNSUPPORTED_ERROR, |
| 87 |
84 /// The need for a type variable bound check, like instantiation of a generic | 88 /// The need for a type variable bound check, like instantiation of a generic |
85 /// type whose type variable have non-trivial bounds. | 89 /// type whose type variable have non-trivial bounds. |
86 TYPE_VARIABLE_BOUNDS_CHECK, | 90 TYPE_VARIABLE_BOUNDS_CHECK, |
87 } | 91 } |
88 | 92 |
89 /// Describes a use of a map literal in the program. | 93 /// Describes a use of a map literal in the program. |
90 class MapLiteralUse { | 94 class MapLiteralUse { |
91 final InterfaceType type; | 95 final InterfaceType type; |
92 final bool isConstant; | 96 final bool isConstant; |
93 final bool isEmpty; | 97 final bool isEmpty; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 if (other is! ListLiteralUse) return false; | 136 if (other is! ListLiteralUse) return false; |
133 return type == other.type && | 137 return type == other.type && |
134 isConstant == other.isConstant && | 138 isConstant == other.isConstant && |
135 isEmpty == other.isEmpty; | 139 isEmpty == other.isEmpty; |
136 } | 140 } |
137 | 141 |
138 String toString() { | 142 String toString() { |
139 return 'ListLiteralUse($type,isConstant:$isConstant,isEmpty:$isEmpty)'; | 143 return 'ListLiteralUse($type,isConstant:$isConstant,isEmpty:$isEmpty)'; |
140 } | 144 } |
141 } | 145 } |
OLD | NEW |