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

Unified Diff: pkg/compiler/lib/src/resolution/tree_elements.dart

Issue 1244513003: dart2js: fix dependency tracking for deferred loading when types are only used (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/resolution/tree_elements.dart
diff --git a/pkg/compiler/lib/src/resolution/tree_elements.dart b/pkg/compiler/lib/src/resolution/tree_elements.dart
index 993c3cc1ea78d268ca24d593eb33660fc7537d1a..36d0fd6cb651010cd5525ae2bf46fd01af5670ee 100644
--- a/pkg/compiler/lib/src/resolution/tree_elements.dart
+++ b/pkg/compiler/lib/src/resolution/tree_elements.dart
@@ -11,7 +11,9 @@ abstract class TreeElements {
/// Iterables of the dependencies that this [TreeElement] records of
/// [analyzedElement].
Iterable<Element> get allElements;
+
void forEachConstantNode(f(Node n, ConstantExpression c));
+ void forEachType(f(Node n, DartType type));
/// A set of additional dependencies. See [registerDependency] below.
Iterable<Element> get otherDependencies;
@@ -173,6 +175,12 @@ class TreeElementMapping extends TreeElements {
DartType getType(Node node) => _types != null ? _types[node] : null;
+ void forEachType(f) {
floitsch 2015/07/17 09:22:25 missing type on the argument.
Siggi Cherem (dart-lang) 2015/07/17 15:34:49 Done.
+ if (_types != null) {
+ _types.forEach(f);
+ }
+ }
+
Iterable<Node> get superUses {
return _superUses != null ? _superUses : const <Node>[];
}

Powered by Google App Engine
This is Rietveld 408576698