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

Side by Side Diff: pkg/compiler/lib/src/enqueue.dart

Issue 1279093003: dart2js: dump info about dependencies added by the enqueuer (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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 part of dart2js; 5 part of dart2js;
6 6
7 typedef ItemCompilationContext ItemCompilationContextCreator(); 7 typedef ItemCompilationContext ItemCompilationContextCreator();
8 8
9 class EnqueueTask extends CompilerTask { 9 class EnqueueTask extends CompilerTask {
10 final ResolutionEnqueuer resolution; 10 final ResolutionEnqueuer resolution;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 /// Returns [:true:] if [member] has been processed by this enqueuer. 89 /// Returns [:true:] if [member] has been processed by this enqueuer.
90 bool isProcessed(Element member); 90 bool isProcessed(Element member);
91 91
92 /** 92 /**
93 * Documentation wanted -- johnniwinther 93 * Documentation wanted -- johnniwinther
94 * 94 *
95 * Invariant: [element] must be a declaration element. 95 * Invariant: [element] must be a declaration element.
96 */ 96 */
97 void addToWorkList(Element element) { 97 void addToWorkList(Element element) {
98 assert(invariant(element, element.isDeclaration)); 98 assert(invariant(element, element.isDeclaration));
99 internalAddToWorkList(element); 99 if (internalAddToWorkList(element)) {
100 // TODO(sigmund): add other missing dependencies (internals, selectors
101 // enqueued after allocations), also enable only for the codegen enqueuer.
102 compiler.dumpInfoTask.registerDependency(
Johnni Winther 2015/08/11 14:12:51 Make this registration conditional [compiler.dumpI
Siggi Cherem (dart-lang) 2015/08/11 19:51:45 Done.
103 compiler.currentElement, element);
104 }
100 } 105 }
101 106
102 /** 107 /**
103 * Adds [element] to the work list if it has not already been processed. 108 * Adds [element] to the work list if it has not already been processed.
104 * 109 *
105 * Returns [true] if the element was actually added to the queue. 110 * Returns [true] if the element was actually added to the queue.
106 */ 111 */
107 bool internalAddToWorkList(Element element); 112 bool internalAddToWorkList(Element element);
108 113
109 /// Apply the [worldImpact] of processing [element] to this enqueuer. 114 /// Apply the [worldImpact] of processing [element] to this enqueuer.
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 void processWorkItem(void f(WorkItem work), WorkItem work) { 957 void processWorkItem(void f(WorkItem work), WorkItem work) {
953 f(work); 958 f(work);
954 } 959 }
955 } 960 }
956 961
957 void removeFromSet(Map<String, Set<Element>> map, Element element) { 962 void removeFromSet(Map<String, Set<Element>> map, Element element) {
958 Set<Element> set = map[element.name]; 963 Set<Element> set = map[element.name];
959 if (set == null) return; 964 if (set == null) return;
960 set.remove(element); 965 set.remove(element);
961 } 966 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698