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

Side by Side Diff: pkg/compiler/lib/src/common/codegen.dart

Issue 1374243002: Remove Registry arguments from Enqueuer. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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.common.codegen; 5 library dart2js.common.codegen;
6 6
7 import '../compiler.dart' show 7 import '../compiler.dart' show
8 Compiler; 8 Compiler;
9 import '../constants/values.dart' show 9 import '../constants/values.dart' show
10 ConstantValue; 10 ConstantValue;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 treeElements.registerDependency(element); 68 treeElements.registerDependency(element);
69 } 69 }
70 70
71 void registerInlining(Element inlinedElement, Element context) { 71 void registerInlining(Element inlinedElement, Element context) {
72 if (compiler.dumpInfo) { 72 if (compiler.dumpInfo) {
73 compiler.dumpInfoTask.registerInlined(inlinedElement, context); 73 compiler.dumpInfoTask.registerInlined(inlinedElement, context);
74 } 74 }
75 } 75 }
76 76
77 void registerInstantiatedClass(ClassElement element) { 77 void registerInstantiatedClass(ClassElement element) {
78 world.registerInstantiatedType(element.rawType, this); 78 backend.registerInstantiatedType(element.rawType, world, this);
79 } 79 }
80 80
81 void registerInstantiatedType(InterfaceType type) { 81 void registerInstantiatedType(InterfaceType type) {
82 world.registerInstantiatedType(type, this); 82 backend.registerInstantiatedType(type, world, this);
83 } 83 }
84 84
85 void registerStaticUse(Element element) { 85 void registerStaticUse(Element element) {
86 world.registerStaticUse(element); 86 world.registerStaticUse(element);
87 } 87 }
88 88
89 void registerDynamicInvocation(UniverseSelector selector) { 89 void registerDynamicInvocation(UniverseSelector selector) {
90 world.registerDynamicInvocation(selector); 90 world.registerDynamicInvocation(selector);
91 compiler.dumpInfoTask.elementUsesSelector(currentElement, selector); 91 compiler.dumpInfoTask.elementUsesSelector(currentElement, selector);
92 } 92 }
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 162
163 void registerSuperInvocation(Element element) { 163 void registerSuperInvocation(Element element) {
164 world.registerStaticUse(element); 164 world.registerStaticUse(element);
165 } 165 }
166 166
167 void registerDirectInvocation(Element element) { 167 void registerDirectInvocation(Element element) {
168 world.registerStaticUse(element); 168 world.registerStaticUse(element);
169 } 169 }
170 170
171 void registerInstantiation(InterfaceType type) { 171 void registerInstantiation(InterfaceType type) {
172 world.registerInstantiatedType(type, this); 172 backend.registerInstantiatedType(type, world, this);
173 } 173 }
174 174
175 void registerAsyncMarker(FunctionElement element) { 175 void registerAsyncMarker(FunctionElement element) {
176 backend.registerAsyncMarker(element, world, this); 176 backend.registerAsyncMarker(element, world, this);
177 } 177 }
178 178
179 } 179 }
180 180
181 /// [WorkItem] used exclusively by the [CodegenEnqueuer]. 181 /// [WorkItem] used exclusively by the [CodegenEnqueuer].
182 class CodegenWorkItem extends WorkItem { 182 class CodegenWorkItem extends WorkItem {
(...skipping 22 matching lines...) Expand all
205 205
206 TreeElements get resolutionTree => element.resolvedAst.elements; 206 TreeElements get resolutionTree => element.resolvedAst.elements;
207 207
208 WorldImpact run(Compiler compiler, CodegenEnqueuer world) { 208 WorldImpact run(Compiler compiler, CodegenEnqueuer world) {
209 if (world.isProcessed(element)) return const WorldImpact(); 209 if (world.isProcessed(element)) return const WorldImpact();
210 210
211 registry = new CodegenRegistry(compiler, resolutionTree); 211 registry = new CodegenRegistry(compiler, resolutionTree);
212 return compiler.codegen(this, world); 212 return compiler.codegen(this, world);
213 } 213 }
214 } 214 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698