Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: pkg/compiler/lib/src/kernel/element_map_impl.dart

Issue 2869403002: Move ElementEnvironment.isSubtype to DartTypes (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/kernel/kernel_strategy.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698