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

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

Issue 2869753002: Pass NativeDataBuilder through ResolutionWorldBuilder (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 1228 matching lines...) Expand 10 before | Expand all | Expand 10 after
1239 1239
1240 @override 1240 @override
1241 String readFromEnvironment(String name) { 1241 String readFromEnvironment(String name) {
1242 return _elementMap._environment.valueOf(name); 1242 return _elementMap._environment.valueOf(name);
1243 } 1243 }
1244 } 1244 }
1245 1245
1246 class KernelResolutionWorldBuilder extends KernelResolutionWorldBuilderBase { 1246 class KernelResolutionWorldBuilder extends KernelResolutionWorldBuilderBase {
1247 final KernelToElementMapImpl elementMap; 1247 final KernelToElementMapImpl elementMap;
1248 1248
1249 KernelResolutionWorldBuilder(this.elementMap, NativeBasicData nativeBasicData, 1249 KernelResolutionWorldBuilder(
1250 this.elementMap,
1251 NativeBasicData nativeBasicData,
1252 NativeDataBuilder nativeDataBuilder,
1250 SelectorConstraintsStrategy selectorConstraintsStrategy) 1253 SelectorConstraintsStrategy selectorConstraintsStrategy)
1251 : super(elementMap.elementEnvironment, elementMap.commonElements, 1254 : super(elementMap.elementEnvironment, elementMap.commonElements,
1252 nativeBasicData, selectorConstraintsStrategy); 1255 nativeBasicData, nativeDataBuilder, selectorConstraintsStrategy);
1253 1256
1254 @override 1257 @override
1255 Iterable<InterfaceType> getSupertypes(ClassEntity cls) { 1258 Iterable<InterfaceType> getSupertypes(ClassEntity cls) {
1256 return elementMap._getOrderedTypeSet(cls).supertypes; 1259 return elementMap._getOrderedTypeSet(cls).supertypes;
1257 } 1260 }
1258 1261
1259 @override 1262 @override
1260 ClassEntity getSuperClass(ClassEntity cls) { 1263 ClassEntity getSuperClass(ClassEntity cls) {
1261 return elementMap._getSuperType(cls)?.element; 1264 return elementMap._getSuperType(cls)?.element;
1262 } 1265 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
1303 } 1306 }
1304 1307
1305 InterfaceType getMixinTypeForClass(KClass cls) { 1308 InterfaceType getMixinTypeForClass(KClass cls) {
1306 _KClassEnv env = elementMap._classEnvs[cls.classIndex]; 1309 _KClassEnv env = elementMap._classEnvs[cls.classIndex];
1307 ir.Supertype mixedInType = env.cls.mixedInType; 1310 ir.Supertype mixedInType = env.cls.mixedInType;
1308 if (mixedInType == null) return null; 1311 if (mixedInType == null) return null;
1309 return elementMap.createInterfaceType( 1312 return elementMap.createInterfaceType(
1310 mixedInType.classNode, mixedInType.typeArguments); 1313 mixedInType.classNode, mixedInType.typeArguments);
1311 } 1314 }
1312 } 1315 }
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