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

Side by Side Diff: pkg/compiler/lib/src/resolution/registry.dart

Issue 1352533002: Enqueue superclasses instead of supertypes. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Unify native behavior processing Created 5 years, 2 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/native/enqueue.dart ('k') | pkg/compiler/lib/src/ssa/codegen.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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.resolution.registry; 5 library dart2js.resolution.registry;
6 6
7 import '../common/backend_api.dart' show 7 import '../common/backend_api.dart' show
8 Backend; 8 Backend;
9 import '../common/registry.dart' show 9 import '../common/registry.dart' show
10 Registry; 10 Registry;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 void registerInstantiation(InterfaceType type) { 87 void registerInstantiation(InterfaceType type) {
88 // TODO(johnniwinther): Remove the need for passing `this`. 88 // TODO(johnniwinther): Remove the need for passing `this`.
89 world.registerInstantiatedType(type, this); 89 world.registerInstantiatedType(type, this);
90 } 90 }
91 91
92 @override 92 @override
93 void registerStaticInvocation(Element element) { 93 void registerStaticInvocation(Element element) {
94 registerDependency(element); 94 registerDependency(element);
95 world.registerStaticUse(element); 95 world.registerStaticUse(element);
96 } 96 }
97
98 String toString() => 'EagerRegistry for ${mapping.analyzedElement}';
97 } 99 }
98 100
99 class ResolutionWorldImpact implements WorldImpact { 101 class ResolutionWorldImpact implements WorldImpact {
100 final Registry registry; 102 final Registry registry;
101 Setlet<UniverseSelector> _dynamicInvocations; 103 Setlet<UniverseSelector> _dynamicInvocations;
102 Setlet<UniverseSelector> _dynamicGetters; 104 Setlet<UniverseSelector> _dynamicGetters;
103 Setlet<UniverseSelector> _dynamicSetters; 105 Setlet<UniverseSelector> _dynamicSetters;
104 Setlet<InterfaceType> _instantiatedTypes; 106 Setlet<InterfaceType> _instantiatedTypes;
105 Setlet<Element> _staticUses; 107 Setlet<Element> _staticUses;
106 Setlet<DartType> _checkedTypes; 108 Setlet<DartType> _checkedTypes;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 this.worldImpact = new ResolutionWorldImpact(compiler, mapping); 217 this.worldImpact = new ResolutionWorldImpact(compiler, mapping);
216 218
217 bool get isForResolution => true; 219 bool get isForResolution => true;
218 220
219 ResolutionEnqueuer get world => compiler.enqueuer.resolution; 221 ResolutionEnqueuer get world => compiler.enqueuer.resolution;
220 222
221 World get universe => compiler.world; 223 World get universe => compiler.world;
222 224
223 Backend get backend => compiler.backend; 225 Backend get backend => compiler.backend;
224 226
227 String toString() => 'ResolutionRegistry for ${mapping.analyzedElement}';
228
225 ////////////////////////////////////////////////////////////////////////////// 229 //////////////////////////////////////////////////////////////////////////////
226 // Node-to-Element mapping functionality. 230 // Node-to-Element mapping functionality.
227 ////////////////////////////////////////////////////////////////////////////// 231 //////////////////////////////////////////////////////////////////////////////
228 232
229 /// Register [node] as the declaration of [element]. 233 /// Register [node] as the declaration of [element].
230 void defineFunction(FunctionExpression node, FunctionElement element) { 234 void defineFunction(FunctionExpression node, FunctionElement element) {
231 // TODO(sigurdm): Remove when not needed by the dart2dart backend. 235 // TODO(sigurdm): Remove when not needed by the dart2dart backend.
232 if (node.name != null) { 236 if (node.name != null) {
233 mapping[node.name] = element; 237 mapping[node.name] = element;
234 } 238 }
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 } 610 }
607 611
608 void registerIncDecOperation() { 612 void registerIncDecOperation() {
609 backend.resolutionCallbacks.onIncDecOperation(this); 613 backend.resolutionCallbacks.onIncDecOperation(this);
610 } 614 }
611 615
612 void registerTryStatement() { 616 void registerTryStatement() {
613 mapping.containsTryStatement = true; 617 mapping.containsTryStatement = true;
614 } 618 }
615 } 619 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/native/enqueue.dart ('k') | pkg/compiler/lib/src/ssa/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698