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

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

Issue 1385183002: Revert "Avoid eager enqueueing from resolution" (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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 184
185 factory CodegenWorkItem( 185 factory CodegenWorkItem(
186 Compiler compiler, 186 Compiler compiler,
187 AstElement element, 187 AstElement element,
188 ItemCompilationContext compilationContext) { 188 ItemCompilationContext compilationContext) {
189 // If this assertion fails, the resolution callbacks of the backend may be 189 // If this assertion fails, the resolution callbacks of the backend may be
190 // missing call of form registry.registerXXX. Alternatively, the code 190 // missing call of form registry.registerXXX. Alternatively, the code
191 // generation could spuriously be adding dependencies on things we know we 191 // generation could spuriously be adding dependencies on things we know we
192 // don't need. 192 // don't need.
193 assert(invariant(element, 193 assert(invariant(element,
194 compiler.enqueuer.resolution.hasBeenProcessed(element), 194 compiler.enqueuer.resolution.hasBeenResolved(element),
195 message: "$element has not been resolved.")); 195 message: "$element has not been resolved."));
196 assert(invariant(element, element.resolvedAst.elements != null, 196 assert(invariant(element, element.resolvedAst.elements != null,
197 message: 'Resolution tree is null for $element in codegen work item')); 197 message: 'Resolution tree is null for $element in codegen work item'));
198 return new CodegenWorkItem.internal(element, compilationContext); 198 return new CodegenWorkItem.internal(element, compilationContext);
199 } 199 }
200 200
201 CodegenWorkItem.internal( 201 CodegenWorkItem.internal(
202 AstElement element, 202 AstElement element,
203 ItemCompilationContext compilationContext) 203 ItemCompilationContext compilationContext)
204 : super(element, compilationContext); 204 : super(element, compilationContext);
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
« no previous file with comments | « pkg/compiler/lib/src/common/backend_api.dart ('k') | pkg/compiler/lib/src/common/resolution.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698