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 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1247 /// where all types arguments are `dynamic`. | 1247 /// where all types arguments are `dynamic`. |
1248 InterfaceType getRawType(ClassEntity cls); | 1248 InterfaceType getRawType(ClassEntity cls); |
1249 | 1249 |
1250 /// Returns the 'this type' of [cls]. That is, the instantiation of [cls] | 1250 /// Returns the 'this type' of [cls]. That is, the instantiation of [cls] |
1251 /// where the type arguments are the type variables of [cls]. | 1251 /// where the type arguments are the type variables of [cls]. |
1252 InterfaceType getThisType(ClassEntity cls); | 1252 InterfaceType getThisType(ClassEntity cls); |
1253 | 1253 |
1254 /// Returns `true` if [cls] is generic. | 1254 /// Returns `true` if [cls] is generic. |
1255 bool isGenericClass(ClassEntity cls); | 1255 bool isGenericClass(ClassEntity cls); |
1256 | 1256 |
1257 /// Returns `true` if [cls] is a mixin application (named or unnamed). | |
1258 bool isMixinApplication(ClassEntity cls); | |
1259 | |
1260 /// Returns `true` if [cls] is an unnamed mixin application. | 1257 /// Returns `true` if [cls] is an unnamed mixin application. |
1261 bool isUnnamedMixinApplication(ClassEntity cls); | 1258 bool isUnnamedMixinApplication(ClassEntity cls); |
1262 | 1259 |
1263 /// The upper bound on the [typeVariable]. If not explicitly declared, this is | 1260 /// The upper bound on the [typeVariable]. If not explicitly declared, this is |
1264 /// `Object`. | 1261 /// `Object`. |
1265 DartType getTypeVariableBound(TypeVariableEntity typeVariable); | 1262 DartType getTypeVariableBound(TypeVariableEntity typeVariable); |
1266 | 1263 |
1267 /// Returns the type if [function]. | 1264 /// Returns the type if [function]. |
1268 FunctionType getFunctionType(FunctionEntity function); | 1265 FunctionType getFunctionType(FunctionEntity function); |
1269 | 1266 |
1270 /// Returns the type of the [local] function. | 1267 /// Returns the type of the [local] function. |
1271 FunctionType getLocalFunctionType(Local local); | 1268 FunctionType getLocalFunctionType(Local local); |
1272 | 1269 |
1273 /// Returns the unaliased type of [type]. | 1270 /// Returns the unaliased type of [type]. |
1274 /// | 1271 /// |
1275 /// Use this during resolution to ensure that the alias has been computed. | 1272 /// Use this during resolution to ensure that the alias has been computed. |
1276 // TODO(johnniwinther): Remove this when the resolver is removed. | 1273 // TODO(johnniwinther): Remove this when the resolver is removed. |
1277 DartType getUnaliasedType(DartType type); | 1274 DartType getUnaliasedType(DartType type); |
1278 | 1275 |
1279 /// Returns `true` if [member] a the synthetic getter `loadLibrary` injected | 1276 /// Returns `true` if [member] a the synthetic getter `loadLibrary` injected |
1280 /// on deferred libraries. | 1277 /// on deferred libraries. |
1281 bool isDeferredLoadLibraryGetter(MemberEntity member); | 1278 bool isDeferredLoadLibraryGetter(MemberEntity member); |
1282 | 1279 |
1283 /// Returns the metadata constants declared on [member]. | 1280 /// Returns the metadata constants declared on [member]. |
1284 Iterable<ConstantValue> getMemberMetadata(MemberEntity member); | 1281 Iterable<ConstantValue> getMemberMetadata(MemberEntity member); |
1285 } | 1282 } |
OLD | NEW |