| 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 |
| 11 import '../dart_types.dart' show InterfaceType; | 11 import '../elements/resolution_types.dart' show InterfaceType; |
| 12 | 12 |
| 13 /// A language feature that may be seen in the program. | 13 /// A language feature that may be seen in the program. |
| 14 // TODO(johnniwinther): Should mirror usage be part of this? | 14 // TODO(johnniwinther): Should mirror usage be part of this? |
| 15 enum Feature { | 15 enum Feature { |
| 16 /// Invocation of a generative construction on an abstract class. | 16 /// Invocation of a generative construction on an abstract class. |
| 17 ABSTRACT_CLASS_INSTANTIATION, | 17 ABSTRACT_CLASS_INSTANTIATION, |
| 18 | 18 |
| 19 /// An assert statement with no message. | 19 /// An assert statement with no message. |
| 20 ASSERT, | 20 ASSERT, |
| 21 | 21 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 if (other is! ListLiteralUse) return false; | 132 if (other is! ListLiteralUse) return false; |
| 133 return type == other.type && | 133 return type == other.type && |
| 134 isConstant == other.isConstant && | 134 isConstant == other.isConstant && |
| 135 isEmpty == other.isEmpty; | 135 isEmpty == other.isEmpty; |
| 136 } | 136 } |
| 137 | 137 |
| 138 String toString() { | 138 String toString() { |
| 139 return 'ListLiteralUse($type,isConstant:$isConstant,isEmpty:$isEmpty)'; | 139 return 'ListLiteralUse($type,isConstant:$isConstant,isEmpty:$isEmpty)'; |
| 140 } | 140 } |
| 141 } | 141 } |
| OLD | NEW |