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

Unified Diff: sdk/lib/_internal/compiler/implementation/world.dart

Issue 12210142: Implement is-checks against type variables. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix computation of classes that need rti. Created 7 years, 10 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: sdk/lib/_internal/compiler/implementation/world.dart
diff --git a/sdk/lib/_internal/compiler/implementation/world.dart b/sdk/lib/_internal/compiler/implementation/world.dart
index 271629bf64132666df45a3b3aba08074886ca86e..6fdf57f51eaccd7f0f0d4093631a4615b0d0d0f5 100644
--- a/sdk/lib/_internal/compiler/implementation/world.dart
+++ b/sdk/lib/_internal/compiler/implementation/world.dart
@@ -60,7 +60,6 @@ class World {
// (3) subclasses of (2) and (3).
void potentiallyAddForRti(ClassElement cls) {
- if (cls.typeVariables.isEmpty) return;
if (classesNeedingRti.contains(cls)) return;
classesNeedingRti.add(cls);
@@ -85,6 +84,9 @@ class World {
if (!itf.isRaw) {
potentiallyAddForRti(itf.element);
}
+ } else if (type is TypeVariableType) {
+ TypeVariableElement variable = type.element;
+ potentiallyAddForRti(variable.enclosingElement);
}
});
}

Powered by Google App Engine
This is Rietveld 408576698