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

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

Issue 1394923003: Use WorldImpact for element dependencies in deferred_load (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 '../common.dart'; 7 import '../common.dart';
8 import '../compiler.dart' show 8 import '../compiler.dart' show
9 Compiler; 9 Compiler;
10 import '../constants/values.dart' show 10 import '../constants/values.dart' show
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 CodegenRegistry(this.compiler, this.treeElements); 46 CodegenRegistry(this.compiler, this.treeElements);
47 47
48 bool get isForResolution => false; 48 bool get isForResolution => false;
49 49
50 Element get currentElement => treeElements.analyzedElement; 50 Element get currentElement => treeElements.analyzedElement;
51 51
52 String toString() => 'CodegenRegistry for $currentElement'; 52 String toString() => 'CodegenRegistry for $currentElement';
53 53
54 // TODO(johnniwinther): Remove this getter when [Registry] creates a 54 // TODO(johnniwinther): Remove this getter when [Registry] creates a
55 // dependency node. 55 // dependency node.
56 Setlet<Element> get otherDependencies => treeElements.otherDependencies; 56 Iterable<Element> get otherDependencies => treeElements.otherDependencies;
57 57
58 CodegenEnqueuer get world => compiler.enqueuer.codegen; 58 CodegenEnqueuer get world => compiler.enqueuer.codegen;
59 JavaScriptBackend get backend => compiler.backend; 59 JavaScriptBackend get backend => compiler.backend;
60 60
61 void registerAssert(bool hasMessage) { 61 void registerAssert(bool hasMessage) {
62 // Codegen does not register asserts. They have been lowered to calls. 62 // Codegen does not register asserts. They have been lowered to calls.
63 assert(false); 63 assert(false);
64 } 64 }
65 65
66 void registerDependency(Element element) { 66 void registerDependency(Element element) {
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 204
205 TreeElements get resolutionTree => element.resolvedAst.elements; 205 TreeElements get resolutionTree => element.resolvedAst.elements;
206 206
207 WorldImpact run(Compiler compiler, CodegenEnqueuer world) { 207 WorldImpact run(Compiler compiler, CodegenEnqueuer world) {
208 if (world.isProcessed(element)) return const WorldImpact(); 208 if (world.isProcessed(element)) return const WorldImpact();
209 209
210 registry = new CodegenRegistry(compiler, resolutionTree); 210 registry = new CodegenRegistry(compiler, resolutionTree);
211 return compiler.codegen(this, world); 211 return compiler.codegen(this, world);
212 } 212 }
213 } 213 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/common/resolution.dart » ('j') | pkg/compiler/lib/src/deferred_load.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698