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

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

Issue 1405563002: Move otherDependencies to globalDependencies. (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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/common/registry.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) 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 final TreeElements treeElements; 44 final TreeElements treeElements;
45 45
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
55 // dependency node.
56 Iterable<Element> get otherDependencies => treeElements.otherDependencies;
57
58 CodegenEnqueuer get world => compiler.enqueuer.codegen; 54 CodegenEnqueuer get world => compiler.enqueuer.codegen;
59 JavaScriptBackend get backend => compiler.backend; 55 JavaScriptBackend get backend => compiler.backend;
60 56
61 void registerAssert(bool hasMessage) { 57 void registerAssert(bool hasMessage) {
62 // Codegen does not register asserts. They have been lowered to calls. 58 // Codegen does not register asserts. They have been lowered to calls.
63 assert(false); 59 assert(false);
64 } 60 }
65 61
66 void registerDependency(Element element) {
67 treeElements.registerDependency(element);
68 }
69
70 void registerInlining(Element inlinedElement, Element context) { 62 void registerInlining(Element inlinedElement, Element context) {
71 if (compiler.dumpInfo) { 63 if (compiler.dumpInfo) {
72 compiler.dumpInfoTask.registerInlined(inlinedElement, context); 64 compiler.dumpInfoTask.registerInlined(inlinedElement, context);
73 } 65 }
74 } 66 }
75 67
76 void registerInstantiatedClass(ClassElement element) { 68 void registerInstantiatedClass(ClassElement element) {
77 backend.registerInstantiatedType(element.rawType, world, this); 69 backend.registerInstantiatedType(element.rawType, world, this);
78 } 70 }
79 71
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 196
205 TreeElements get resolutionTree => element.resolvedAst.elements; 197 TreeElements get resolutionTree => element.resolvedAst.elements;
206 198
207 WorldImpact run(Compiler compiler, CodegenEnqueuer world) { 199 WorldImpact run(Compiler compiler, CodegenEnqueuer world) {
208 if (world.isProcessed(element)) return const WorldImpact(); 200 if (world.isProcessed(element)) return const WorldImpact();
209 201
210 registry = new CodegenRegistry(compiler, resolutionTree); 202 registry = new CodegenRegistry(compiler, resolutionTree);
211 return compiler.codegen(this, world); 203 return compiler.codegen(this, world);
212 } 204 }
213 } 205 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/common/registry.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698