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

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

Issue 1413613010: Normalize type masks to use the least upper instantiated subclass/type. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix try/poi Created 5 years, 1 month 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/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;
}
});
}
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/type_mask_system.dart ('k') | pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698