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

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

Issue 2863073003: Access NativeData only 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
« no previous file with comments | « pkg/compiler/lib/src/types/types.dart ('k') | tests/compiler/dart2js/jsinterop/world_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 @override 156 @override
157 Iterable<InterfaceType> getSupertypes(ClassElement cls) => cls.allSupertypes; 157 Iterable<InterfaceType> getSupertypes(ClassElement cls) => cls.allSupertypes;
158 158
159 ClosedWorld closeWorld() { 159 ClosedWorld closeWorld() {
160 Map<ClassEntity, Set<ClassEntity>> typesImplementedBySubclasses = 160 Map<ClassEntity, Set<ClassEntity>> typesImplementedBySubclasses =
161 populateHierarchyNodes(); 161 populateHierarchyNodes();
162 _closed = true; 162 _closed = true;
163 return _closedWorldCache = new ClosedWorldImpl( 163 return _closedWorldCache = new ClosedWorldImpl(
164 commonElements: _commonElements, 164 commonElements: _commonElements,
165 constantSystem: _backend.constantSystem, 165 constantSystem: _backend.constantSystem,
166 nativeData: _backend.nativeData, 166 nativeData: _backend.nativeDataBuilder.close(),
167 interceptorData: _backend.interceptorData, 167 interceptorData: _backend.interceptorData,
168 backendUsage: _backend.backendUsage, 168 backendUsage: _backend.backendUsage,
169 resolutionWorldBuilder: this, 169 resolutionWorldBuilder: this,
170 functionSet: _allFunctions.close(), 170 functionSet: _allFunctions.close(),
171 allTypedefs: _allTypedefs, 171 allTypedefs: _allTypedefs,
172 mixinUses: _mixinUses, 172 mixinUses: _mixinUses,
173 typesImplementedBySubclasses: typesImplementedBySubclasses, 173 typesImplementedBySubclasses: typesImplementedBySubclasses,
174 classHierarchyNodes: _classHierarchyNodes, 174 classHierarchyNodes: _classHierarchyNodes,
175 classSets: _classSets); 175 classSets: _classSets);
176 } 176 }
177 177
178 @override 178 @override
179 void registerMixinUse( 179 void registerMixinUse(
180 MixinApplicationElement mixinApplication, ClassElement mixin) { 180 MixinApplicationElement mixinApplication, ClassElement mixin) {
181 assert(mixin.isDeclaration); 181 assert(mixin.isDeclaration);
182 super.registerMixinUse(mixinApplication, mixin); 182 super.registerMixinUse(mixinApplication, mixin);
183 } 183 }
184 } 184 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/types/types.dart ('k') | tests/compiler/dart2js/jsinterop/world_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698