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

Unified Diff: pkg/compiler/lib/src/deferred_load.dart

Issue 3000843002: Add dependencies to type variables used in the super type declaration, but do (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/deferred_load.dart
diff --git a/pkg/compiler/lib/src/deferred_load.dart b/pkg/compiler/lib/src/deferred_load.dart
index fe9a4731edb41b6c4a3165dc2a876a4fb0ccfd1d..6fbe687bbaab24208b61cbcc28aacc61ff283458 100644
--- a/pkg/compiler/lib/src/deferred_load.dart
+++ b/pkg/compiler/lib/src/deferred_load.dart
@@ -319,9 +319,7 @@ class DeferredLoadTask extends CompilerTask {
elements.add(type.element);
collectTypeDependencies(type.unaliased);
} else if (type is ResolutionInterfaceType) {
- if (elements.add(type.element)) {
- collectTypeDependencies(type.element.supertype);
- }
+ elements.add(type.element);
}
}
@@ -456,11 +454,16 @@ class DeferredLoadTask extends CompilerTask {
}
ClassElement cls = element.declaration;
- cls.implementation.forEachMember(addLiveInstanceMember);
- for (ResolutionInterfaceType type in cls.implementation.allSupertypes) {
+ ClassElement implementation = cls.implementation;
+ implementation.forEachMember(addLiveInstanceMember);
+ var supertype = implementation.supertype;
+ if (supertype is GenericType) {
+ supertype.typeArguments.forEach(collectTypeDependencies);
+ }
+ for (ResolutionInterfaceType type in implementation.allSupertypes) {
elements.add(type.element.implementation);
sra1 2017/08/11 21:55:46 I think we need types from all supertypes to ensur
Siggi Cherem (dart-lang) 2017/08/11 22:08:15 Done. Also added a test with an `is` check. We sho
}
- elements.add(cls.implementation);
+ elements.add(implementation);
} else if (Elements.isStaticOrTopLevel(element) || element.isConstructor) {
elements.add(element);
collectDependencies(element);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698