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

Side by Side Diff: pkg/compiler/lib/src/universe/element_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 /// [ResolutionEnqueuerWorldBuilder] based on the [Element] model. 7 /// [ResolutionEnqueuerWorldBuilder] based on the [Element] model.
8 class ElementResolutionWorldBuilder extends ResolutionWorldBuilderBase { 8 class ElementResolutionWorldBuilder extends ResolutionWorldBuilderBase {
9 /// Used for testing the new more precise computation of instantiated types 9 /// Used for testing the new more precise computation of instantiated types
10 /// and classes. 10 /// and classes.
11 static bool useInstantiationMap = false; 11 static bool useInstantiationMap = false;
12 12
13 final JavaScriptBackend _backend;
14 final Resolution _resolution; 13 final Resolution _resolution;
15 14
16 ElementResolutionWorldBuilder( 15 ElementResolutionWorldBuilder(
17 this._backend, 16 JavaScriptBackend backend,
18 this._resolution, 17 this._resolution,
19 NativeBasicData nativeBasicData, 18 NativeBasicData nativeBasicData,
20 NativeDataBuilder nativeDataBuilder, 19 NativeDataBuilder nativeDataBuilder,
21 InterceptorDataBuilder interceptorDataBuilder, 20 InterceptorDataBuilder interceptorDataBuilder,
22 BackendUsageBuilder backendUsageBuilder, 21 BackendUsageBuilder backendUsageBuilder,
23 SelectorConstraintsStrategy selectorConstraintsStrategy) 22 SelectorConstraintsStrategy selectorConstraintsStrategy)
24 : super( 23 : super(
25 _backend.compiler.elementEnvironment, 24 backend.compiler.elementEnvironment,
26 _resolution.commonElements, 25 _resolution.commonElements,
26 backend.constantSystem,
27 nativeBasicData, 27 nativeBasicData,
28 nativeDataBuilder, 28 nativeDataBuilder,
29 interceptorDataBuilder, 29 interceptorDataBuilder,
30 backendUsageBuilder, 30 backendUsageBuilder,
31 selectorConstraintsStrategy); 31 selectorConstraintsStrategy);
32 32
33 bool isImplemented(ClassElement cls) { 33 bool isImplemented(ClassElement cls) {
34 return super.isImplemented(cls.declaration); 34 return super.isImplemented(cls.declaration);
35 } 35 }
36 36
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 167
168 @override 168 @override
169 Iterable<InterfaceType> getSupertypes(ClassElement cls) => cls.allSupertypes; 169 Iterable<InterfaceType> getSupertypes(ClassElement cls) => cls.allSupertypes;
170 170
171 ClosedWorld closeWorld() { 171 ClosedWorld closeWorld() {
172 Map<ClassEntity, Set<ClassEntity>> typesImplementedBySubclasses = 172 Map<ClassEntity, Set<ClassEntity>> typesImplementedBySubclasses =
173 populateHierarchyNodes(); 173 populateHierarchyNodes();
174 _closed = true; 174 _closed = true;
175 return _closedWorldCache = new ClosedWorldImpl( 175 return _closedWorldCache = new ClosedWorldImpl(
176 commonElements: _commonElements, 176 commonElements: _commonElements,
177 constantSystem: _backend.constantSystem, 177 constantSystem: _constantSystem,
178 nativeData: _nativeDataBuilder.close(), 178 nativeData: _nativeDataBuilder.close(),
179 interceptorData: _interceptorDataBuilder.close(), 179 interceptorData: _interceptorDataBuilder.close(),
180 backendUsage: _backendUsageBuilder.close(), 180 backendUsage: _backendUsageBuilder.close(),
181 resolutionWorldBuilder: this, 181 resolutionWorldBuilder: this,
182 functionSet: _allFunctions.close(), 182 functionSet: _allFunctions.close(),
183 allTypedefs: _allTypedefs, 183 allTypedefs: _allTypedefs,
184 mixinUses: _mixinUses, 184 mixinUses: _mixinUses,
185 typesImplementedBySubclasses: typesImplementedBySubclasses, 185 typesImplementedBySubclasses: typesImplementedBySubclasses,
186 classHierarchyNodes: _classHierarchyNodes, 186 classHierarchyNodes: _classHierarchyNodes,
187 classSets: _classSets); 187 classSets: _classSets);
188 } 188 }
189 189
190 @override 190 @override
191 void registerMixinUse( 191 void registerMixinUse(
192 MixinApplicationElement mixinApplication, ClassElement mixin) { 192 MixinApplicationElement mixinApplication, ClassElement mixin) {
193 assert(mixin.isDeclaration); 193 assert(mixin.isDeclaration);
194 super.registerMixinUse(mixinApplication, mixin); 194 super.registerMixinUse(mixinApplication, mixin);
195 } 195 }
196 } 196 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698