Index: pkg/compiler/lib/src/enqueue.dart |
diff --git a/pkg/compiler/lib/src/enqueue.dart b/pkg/compiler/lib/src/enqueue.dart |
index 39ec4385cefbe2da7670472c8ccf54acd43ac9a7..878898901aba49ba6a578f5d85432b67fa733d21 100644 |
--- a/pkg/compiler/lib/src/enqueue.dart |
+++ b/pkg/compiler/lib/src/enqueue.dart |
@@ -178,15 +178,19 @@ abstract class Enqueuer { |
task.measure(() { |
ClassElement cls = type.element; |
cls.ensureResolved(resolution); |
+ bool isNative = compiler.backend.isNative(cls); |
universe.registerTypeInstantiation( |
type, |
- isNative: compiler.backend.isNative(cls), |
+ isNative: isNative, |
byMirrors: mirrorUsage, |
onImplemented: (ClassElement cls) { |
compiler.backend.registerImplementedClass( |
cls, this, compiler.globalDependencies); |
}); |
- processInstantiatedClass(cls); |
+ // TODO(johnniwinther): Share this reasoning with [Universe]. |
+ if (!cls.isAbstract || isNative || mirrorUsage) { |
+ processInstantiatedClass(cls); |
+ } |
}); |
} |
@@ -335,9 +339,10 @@ abstract class Enqueuer { |
superclass, this, compiler.globalDependencies); |
} |
- while (cls != null) { |
- processClass(cls); |
- cls = cls.superclass; |
+ ClassElement superclass = cls; |
+ while (superclass != null) { |
+ processClass(superclass); |
+ superclass = superclass.superclass; |
} |
}); |
} |