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

Side by Side Diff: pkg/compiler/lib/src/universe/resolution_world_builder.dart

Issue 2871583002: Pass InterceptorData through ResolutionWorldBuilder and access it through ClosedWorld (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 part of world_builder; 5 part of world_builder;
6 6
7 abstract class ResolutionWorldBuilder implements WorldBuilder, OpenWorld { 7 abstract class ResolutionWorldBuilder implements WorldBuilder, OpenWorld {
8 /// Set of all local functions in the program. Used by the mirror tracking 8 /// Set of all local functions in the program. Used by the mirror tracking
9 /// system to find all live closure instances. 9 /// system to find all live closure instances.
10 Iterable<Local> get localFunctions; 10 Iterable<Local> get localFunctions;
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 /// instantiated. 327 /// instantiated.
328 final Set<FunctionEntity> closurizedMembersWithFreeTypeVariables = 328 final Set<FunctionEntity> closurizedMembersWithFreeTypeVariables =
329 new Set<FunctionEntity>(); 329 new Set<FunctionEntity>();
330 330
331 final ElementEnvironment _elementEnvironment; 331 final ElementEnvironment _elementEnvironment;
332 332
333 final CommonElements _commonElements; 333 final CommonElements _commonElements;
334 334
335 final NativeBasicData _nativeBasicData; 335 final NativeBasicData _nativeBasicData;
336 final NativeDataBuilder _nativeDataBuilder; 336 final NativeDataBuilder _nativeDataBuilder;
337 final InterceptorDataBuilder _interceptorDataBuilder;
337 338
338 final SelectorConstraintsStrategy selectorConstraintsStrategy; 339 final SelectorConstraintsStrategy selectorConstraintsStrategy;
339 340
340 bool hasRuntimeTypeSupport = false; 341 bool hasRuntimeTypeSupport = false;
341 bool hasIsolateSupport = false; 342 bool hasIsolateSupport = false;
342 bool hasFunctionApplySupport = false; 343 bool hasFunctionApplySupport = false;
343 344
344 bool _closed = false; 345 bool _closed = false;
345 ClosedWorld _closedWorldCache; 346 ClosedWorld _closedWorldCache;
346 FunctionSetBuilder _allFunctions; 347 FunctionSetBuilder _allFunctions;
(...skipping 11 matching lines...) Expand all
358 359
359 final Set<ConstantValue> _constantValues = new Set<ConstantValue>(); 360 final Set<ConstantValue> _constantValues = new Set<ConstantValue>();
360 361
361 bool get isClosed => _closed; 362 bool get isClosed => _closed;
362 363
363 ResolutionWorldBuilderBase( 364 ResolutionWorldBuilderBase(
364 this._elementEnvironment, 365 this._elementEnvironment,
365 this._commonElements, 366 this._commonElements,
366 this._nativeBasicData, 367 this._nativeBasicData,
367 this._nativeDataBuilder, 368 this._nativeDataBuilder,
369 this._interceptorDataBuilder,
368 this.selectorConstraintsStrategy) { 370 this.selectorConstraintsStrategy) {
369 _allFunctions = new FunctionSetBuilder(); 371 _allFunctions = new FunctionSetBuilder();
370 } 372 }
371 373
372 Iterable<ClassEntity> get processedClasses => _processedClasses.keys 374 Iterable<ClassEntity> get processedClasses => _processedClasses.keys
373 .where((cls) => _processedClasses[cls].isInstantiated); 375 .where((cls) => _processedClasses[cls].isInstantiated);
374 376
375 ClosedWorld get closedWorldForTesting { 377 ClosedWorld get closedWorldForTesting {
376 if (!_closed) { 378 if (!_closed) {
377 throw new SpannableAssertionFailure( 379 throw new SpannableAssertionFailure(
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 } 916 }
915 } 917 }
916 918
917 abstract class KernelResolutionWorldBuilderBase 919 abstract class KernelResolutionWorldBuilderBase
918 extends ResolutionWorldBuilderBase { 920 extends ResolutionWorldBuilderBase {
919 KernelResolutionWorldBuilderBase( 921 KernelResolutionWorldBuilderBase(
920 ElementEnvironment elementEnvironment, 922 ElementEnvironment elementEnvironment,
921 CommonElements commonElements, 923 CommonElements commonElements,
922 NativeBasicData nativeBasicData, 924 NativeBasicData nativeBasicData,
923 NativeDataBuilder nativeDataBuilder, 925 NativeDataBuilder nativeDataBuilder,
926 InterceptorDataBuilder interceptorDataBuilder,
924 SelectorConstraintsStrategy selectorConstraintsStrategy) 927 SelectorConstraintsStrategy selectorConstraintsStrategy)
925 : super(elementEnvironment, commonElements, nativeBasicData, 928 : super(
926 nativeDataBuilder, selectorConstraintsStrategy); 929 elementEnvironment,
930 commonElements,
931 nativeBasicData,
932 nativeDataBuilder,
933 interceptorDataBuilder,
934 selectorConstraintsStrategy);
927 935
928 @override 936 @override
929 ClosedWorld closeWorld() { 937 ClosedWorld closeWorld() {
930 Map<ClassEntity, Set<ClassEntity>> typesImplementedBySubclasses = 938 Map<ClassEntity, Set<ClassEntity>> typesImplementedBySubclasses =
931 populateHierarchyNodes(); 939 populateHierarchyNodes();
932 _closed = true; 940 _closed = true;
933 // TODO(johnniwinther): Implement this. 941 // TODO(johnniwinther): Implement this.
934 return _closedWorldCache = new KernelClosedWorld( 942 return _closedWorldCache = new KernelClosedWorld(
935 commonElements: _commonElements, 943 commonElements: _commonElements,
936 // TODO(johnniwinther): Compute these. 944 // TODO(johnniwinther): Compute these.
937 constantSystem: null, 945 constantSystem: null,
938 nativeData: _nativeDataBuilder.close(), 946 nativeData: _nativeDataBuilder.close(),
939 interceptorData: null, 947 interceptorData: null,
940 backendUsage: null, 948 backendUsage: null,
941 resolutionWorldBuilder: this, 949 resolutionWorldBuilder: this,
942 functionSet: _allFunctions.close(), 950 functionSet: _allFunctions.close(),
943 allTypedefs: _allTypedefs, 951 allTypedefs: _allTypedefs,
944 mixinUses: _mixinUses, 952 mixinUses: _mixinUses,
945 typesImplementedBySubclasses: typesImplementedBySubclasses, 953 typesImplementedBySubclasses: typesImplementedBySubclasses,
946 classHierarchyNodes: _classHierarchyNodes, 954 classHierarchyNodes: _classHierarchyNodes,
947 classSets: _classSets); 955 classSets: _classSets);
948 } 956 }
949 957
950 @override 958 @override
951 void registerClass(ClassEntity cls) { 959 void registerClass(ClassEntity cls) {
952 throw new UnimplementedError('KernelResolutionWorldBuilder.registerClass'); 960 throw new UnimplementedError('KernelResolutionWorldBuilder.registerClass');
953 } 961 }
954 } 962 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/universe/element_world_builder.dart ('k') | pkg/compiler/lib/src/universe/world_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698