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

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

Issue 2908253003: Handle null literal in compile_from_dill (Closed)
Patch Set: Created 3 years, 6 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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 /// Set of live closurized members whose signatures reference type variables. 332 /// Set of live closurized members whose signatures reference type variables.
333 /// 333 ///
334 /// A closurized method is considered live if the enclosing class has been 334 /// A closurized method is considered live if the enclosing class has been
335 /// instantiated. 335 /// instantiated.
336 final Set<FunctionEntity> closurizedMembersWithFreeTypeVariables = 336 final Set<FunctionEntity> closurizedMembersWithFreeTypeVariables =
337 new Set<FunctionEntity>(); 337 new Set<FunctionEntity>();
338 338
339 final ElementEnvironment _elementEnvironment; 339 final ElementEnvironment _elementEnvironment;
340 340
341 final CommonElements _commonElements; 341 final CommonElements _commonElements;
342 final ConstantSystem _constantSystem;
342 343
343 final NativeBasicData _nativeBasicData; 344 final NativeBasicData _nativeBasicData;
344 final NativeDataBuilder _nativeDataBuilder; 345 final NativeDataBuilder _nativeDataBuilder;
345 final InterceptorDataBuilder _interceptorDataBuilder; 346 final InterceptorDataBuilder _interceptorDataBuilder;
346 final BackendUsageBuilder _backendUsageBuilder; 347 final BackendUsageBuilder _backendUsageBuilder;
347 348
348 final SelectorConstraintsStrategy selectorConstraintsStrategy; 349 final SelectorConstraintsStrategy selectorConstraintsStrategy;
349 350
350 bool hasRuntimeTypeSupport = false; 351 bool hasRuntimeTypeSupport = false;
351 bool hasIsolateSupport = false; 352 bool hasIsolateSupport = false;
(...skipping 14 matching lines...) Expand all
366 <ClassEntity, ClassHierarchyNode>{}; 367 <ClassEntity, ClassHierarchyNode>{};
367 final Map<ClassEntity, ClassSet> _classSets = <ClassEntity, ClassSet>{}; 368 final Map<ClassEntity, ClassSet> _classSets = <ClassEntity, ClassSet>{};
368 369
369 final Set<ConstantValue> _constantValues = new Set<ConstantValue>(); 370 final Set<ConstantValue> _constantValues = new Set<ConstantValue>();
370 371
371 bool get isClosed => _closed; 372 bool get isClosed => _closed;
372 373
373 ResolutionWorldBuilderBase( 374 ResolutionWorldBuilderBase(
374 this._elementEnvironment, 375 this._elementEnvironment,
375 this._commonElements, 376 this._commonElements,
377 this._constantSystem,
376 this._nativeBasicData, 378 this._nativeBasicData,
377 this._nativeDataBuilder, 379 this._nativeDataBuilder,
378 this._interceptorDataBuilder, 380 this._interceptorDataBuilder,
379 this._backendUsageBuilder, 381 this._backendUsageBuilder,
380 this.selectorConstraintsStrategy) { 382 this.selectorConstraintsStrategy) {
381 _allFunctions = new FunctionSetBuilder(); 383 _allFunctions = new FunctionSetBuilder();
382 } 384 }
383 385
384 Iterable<ClassEntity> get processedClasses => _processedClasses.keys 386 Iterable<ClassEntity> get processedClasses => _processedClasses.keys
385 .where((cls) => _processedClasses[cls].isInstantiated); 387 .where((cls) => _processedClasses[cls].isInstantiated);
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
923 925
924 return typesImplementedBySubclasses; 926 return typesImplementedBySubclasses;
925 } 927 }
926 } 928 }
927 929
928 abstract class KernelResolutionWorldBuilderBase 930 abstract class KernelResolutionWorldBuilderBase
929 extends ResolutionWorldBuilderBase { 931 extends ResolutionWorldBuilderBase {
930 KernelResolutionWorldBuilderBase( 932 KernelResolutionWorldBuilderBase(
931 ElementEnvironment elementEnvironment, 933 ElementEnvironment elementEnvironment,
932 CommonElements commonElements, 934 CommonElements commonElements,
935 ConstantSystem constantSystem,
933 NativeBasicData nativeBasicData, 936 NativeBasicData nativeBasicData,
934 NativeDataBuilder nativeDataBuilder, 937 NativeDataBuilder nativeDataBuilder,
935 InterceptorDataBuilder interceptorDataBuilder, 938 InterceptorDataBuilder interceptorDataBuilder,
936 BackendUsageBuilder backendUsageBuilder, 939 BackendUsageBuilder backendUsageBuilder,
937 SelectorConstraintsStrategy selectorConstraintsStrategy) 940 SelectorConstraintsStrategy selectorConstraintsStrategy)
938 : super( 941 : super(
939 elementEnvironment, 942 elementEnvironment,
940 commonElements, 943 commonElements,
944 constantSystem,
941 nativeBasicData, 945 nativeBasicData,
942 nativeDataBuilder, 946 nativeDataBuilder,
943 interceptorDataBuilder, 947 interceptorDataBuilder,
944 backendUsageBuilder, 948 backendUsageBuilder,
945 selectorConstraintsStrategy); 949 selectorConstraintsStrategy);
946 950
947 @override 951 @override
948 ClosedWorld closeWorld() { 952 ClosedWorld closeWorld() {
949 Map<ClassEntity, Set<ClassEntity>> typesImplementedBySubclasses = 953 Map<ClassEntity, Set<ClassEntity>> typesImplementedBySubclasses =
950 populateHierarchyNodes(); 954 populateHierarchyNodes();
951 _closed = true; 955 _closed = true;
952 return _closedWorldCache = new KernelClosedWorld( 956 return _closedWorldCache = new KernelClosedWorld(
953 commonElements: _commonElements, 957 commonElements: _commonElements,
954 nativeData: _nativeDataBuilder.close(), 958 nativeData: _nativeDataBuilder.close(),
955 interceptorData: _interceptorDataBuilder.close(), 959 interceptorData: _interceptorDataBuilder.close(),
956 backendUsage: _backendUsageBuilder.close(), 960 backendUsage: _backendUsageBuilder.close(),
957 // TODO(johnniwinther): Compute these. 961 constantSystem: _constantSystem,
958 constantSystem: null,
959 resolutionWorldBuilder: this, 962 resolutionWorldBuilder: this,
960 functionSet: _allFunctions.close(), 963 functionSet: _allFunctions.close(),
961 allTypedefs: _allTypedefs, 964 allTypedefs: _allTypedefs,
962 mixinUses: _mixinUses, 965 mixinUses: _mixinUses,
963 typesImplementedBySubclasses: typesImplementedBySubclasses, 966 typesImplementedBySubclasses: typesImplementedBySubclasses,
964 classHierarchyNodes: _classHierarchyNodes, 967 classHierarchyNodes: _classHierarchyNodes,
965 classSets: _classSets); 968 classSets: _classSets);
966 } 969 }
967 970
968 @override 971 @override
969 void registerClass(ClassEntity cls) { 972 void registerClass(ClassEntity cls) {
970 throw new UnimplementedError('KernelResolutionWorldBuilder.registerClass'); 973 throw new UnimplementedError('KernelResolutionWorldBuilder.registerClass');
971 } 974 }
972 } 975 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698