| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 library dart2js.kernel.element_map; | 5 library dart2js.kernel.element_map; |
| 6 | 6 |
| 7 import 'package:kernel/ast.dart' as ir; | 7 import 'package:kernel/ast.dart' as ir; |
| 8 | 8 |
| 9 import '../common.dart'; | 9 import '../common.dart'; |
| 10 import '../common/names.dart' show Identifiers; | 10 import '../common/names.dart' show Identifiers; |
| (...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 943 'KernelElementEnvironment.getTypeVariableBound'); | 943 'KernelElementEnvironment.getTypeVariableBound'); |
| 944 } | 944 } |
| 945 | 945 |
| 946 @override | 946 @override |
| 947 InterfaceType createInterfaceType( | 947 InterfaceType createInterfaceType( |
| 948 ClassEntity cls, List<DartType> typeArguments) { | 948 ClassEntity cls, List<DartType> typeArguments) { |
| 949 return new InterfaceType(cls, typeArguments); | 949 return new InterfaceType(cls, typeArguments); |
| 950 } | 950 } |
| 951 | 951 |
| 952 @override | 952 @override |
| 953 bool isSubtype(DartType a, DartType b) { | |
| 954 return elementMap.types.isSubtype(a, b); | |
| 955 } | |
| 956 | |
| 957 @override | |
| 958 FunctionType getFunctionType(KFunction function) { | 953 FunctionType getFunctionType(KFunction function) { |
| 959 return elementMap._getFunctionType(function); | 954 return elementMap._getFunctionType(function); |
| 960 } | 955 } |
| 961 | 956 |
| 962 @override | 957 @override |
| 963 FunctionType getLocalFunctionType(KLocalFunction function) { | 958 FunctionType getLocalFunctionType(KLocalFunction function) { |
| 964 return function.functionType; | 959 return function.functionType; |
| 965 } | 960 } |
| 966 | 961 |
| 967 @override | 962 @override |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1313 } | 1308 } |
| 1314 | 1309 |
| 1315 InterfaceType getMixinTypeForClass(KClass cls) { | 1310 InterfaceType getMixinTypeForClass(KClass cls) { |
| 1316 _KClassEnv env = elementMap._classEnvs[cls.classIndex]; | 1311 _KClassEnv env = elementMap._classEnvs[cls.classIndex]; |
| 1317 ir.Supertype mixedInType = env.cls.mixedInType; | 1312 ir.Supertype mixedInType = env.cls.mixedInType; |
| 1318 if (mixedInType == null) return null; | 1313 if (mixedInType == null) return null; |
| 1319 return elementMap.createInterfaceType( | 1314 return elementMap.createInterfaceType( |
| 1320 mixedInType.classNode, mixedInType.typeArguments); | 1315 mixedInType.classNode, mixedInType.typeArguments); |
| 1321 } | 1316 } |
| 1322 } | 1317 } |
| OLD | NEW |