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

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
« no previous file with comments | « pkg/compiler/lib/src/deferred_load.dart ('k') | tests/compiler/dart2js_extra/deferred_split_lib1.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..48c54308e93bd8463a50aa2089cee6aa9c1a2ff2 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 t));
/// 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(Node n, DartType t)) {
+ if (_types != null) {
+ _types.forEach(f);
+ }
+ }
+
Iterable<Node> get superUses {
return _superUses != null ? _superUses : const <Node>[];
}
« no previous file with comments | « pkg/compiler/lib/src/deferred_load.dart ('k') | tests/compiler/dart2js_extra/deferred_split_lib1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698