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

Unified Diff: pkg/compiler/lib/src/types/union_type_mask.dart

Issue 2443953002: Introduce isAbstractlyInstantiated to avoid exact masks of abstract classes. (Closed)
Patch Set: Updated cf. comments. Created 4 years, 2 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: pkg/compiler/lib/src/types/union_type_mask.dart
diff --git a/pkg/compiler/lib/src/types/union_type_mask.dart b/pkg/compiler/lib/src/types/union_type_mask.dart
index 8ba9a6ad3fb02ce450f74c40f1dd51f9e116f6fe..0aa45362c46f175386c999c3a599cd9df25b0939 100644
--- a/pkg/compiler/lib/src/types/union_type_mask.dart
+++ b/pkg/compiler/lib/src/types/union_type_mask.dart
@@ -88,6 +88,8 @@ class UnionTypeMask implements TypeMask {
}
static TypeMask flatten(List<FlatTypeMask> masks, ClosedWorld closedWorld) {
+ // TODO(johnniwinther): Move this computation to [ClosedWorld] and use the
+ // class set structures.
assert(masks.length > 1);
// If either type mask is a subtype type mask, we cannot use a
// subclass type mask to represent their union.
@@ -104,7 +106,7 @@ class UnionTypeMask implements TypeMask {
for (Entity candidate in candidates) {
bool isInstantiatedStrictSubclass(cls) =>
cls != candidate &&
- closedWorld.isDirectlyInstantiated(cls) &&
+ closedWorld.isRootInstantiated(cls) &&
closedWorld.isSubclassOf(cls, candidate);
int size;
« no previous file with comments | « pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart ('k') | pkg/compiler/lib/src/universe/class_set.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698