| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 // TODO(sigmund): rename and move to common/elements.dart | 5 // TODO(sigmund): rename and move to common/elements.dart |
| 6 library dart2js.type_system; | 6 library dart2js.type_system; |
| 7 | 7 |
| 8 import 'common/names.dart' show Identifiers, Uris; | 8 import 'common/names.dart' show Identifiers, Uris; |
| 9 import 'constants/values.dart'; | 9 import 'constants/values.dart'; |
| 10 import 'elements/entities.dart'; | 10 import 'elements/entities.dart'; |
| (...skipping 1228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1239 /// where the type arguments are the type variables of [cls]. | 1239 /// where the type arguments are the type variables of [cls]. |
| 1240 InterfaceType getThisType(ClassEntity cls); | 1240 InterfaceType getThisType(ClassEntity cls); |
| 1241 | 1241 |
| 1242 /// Returns `true` if [cls] is generic. | 1242 /// Returns `true` if [cls] is generic. |
| 1243 bool isGenericClass(ClassEntity cls); | 1243 bool isGenericClass(ClassEntity cls); |
| 1244 | 1244 |
| 1245 /// The upper bound on the [typeVariable]. If not explicitly declared, this is | 1245 /// The upper bound on the [typeVariable]. If not explicitly declared, this is |
| 1246 /// `Object`. | 1246 /// `Object`. |
| 1247 DartType getTypeVariableBound(TypeVariableEntity typeVariable); | 1247 DartType getTypeVariableBound(TypeVariableEntity typeVariable); |
| 1248 | 1248 |
| 1249 /// Returns `true` if [a] is a subtype of [b]. | |
| 1250 bool isSubtype(DartType a, DartType b); | |
| 1251 | |
| 1252 /// Returns the type if [function]. | 1249 /// Returns the type if [function]. |
| 1253 FunctionType getFunctionType(FunctionEntity function); | 1250 FunctionType getFunctionType(FunctionEntity function); |
| 1254 | 1251 |
| 1255 /// Returns the type of the [local] function. | 1252 /// Returns the type of the [local] function. |
| 1256 FunctionType getLocalFunctionType(Local local); | 1253 FunctionType getLocalFunctionType(Local local); |
| 1257 | 1254 |
| 1258 /// Returns the unaliased type of [type]. | 1255 /// Returns the unaliased type of [type]. |
| 1259 /// | 1256 /// |
| 1260 /// Use this during resolution to ensure that the alias has been computed. | 1257 /// Use this during resolution to ensure that the alias has been computed. |
| 1261 // TODO(johnniwinther): Remove this when the resolver is removed. | 1258 // TODO(johnniwinther): Remove this when the resolver is removed. |
| 1262 DartType getUnaliasedType(DartType type); | 1259 DartType getUnaliasedType(DartType type); |
| 1263 | 1260 |
| 1264 /// Returns the [CallStructure] corresponding to calling [entity] with all | 1261 /// Returns the [CallStructure] corresponding to calling [entity] with all |
| 1265 /// arguments, both required and optional. | 1262 /// arguments, both required and optional. |
| 1266 CallStructure getCallStructure(FunctionEntity entity); | 1263 CallStructure getCallStructure(FunctionEntity entity); |
| 1267 | 1264 |
| 1268 /// Returns `true` if [member] a the synthetic getter `loadLibrary` injected | 1265 /// Returns `true` if [member] a the synthetic getter `loadLibrary` injected |
| 1269 /// on deferred libraries. | 1266 /// on deferred libraries. |
| 1270 bool isDeferredLoadLibraryGetter(MemberEntity member); | 1267 bool isDeferredLoadLibraryGetter(MemberEntity member); |
| 1271 | 1268 |
| 1272 /// Returns the metadata constants declared on [member]. | 1269 /// Returns the metadata constants declared on [member]. |
| 1273 Iterable<ConstantValue> getMemberMetadata(MemberEntity member); | 1270 Iterable<ConstantValue> getMemberMetadata(MemberEntity member); |
| 1274 } | 1271 } |
| OLD | NEW |