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

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

Issue 2366363002: Move remaining functionality from ClassWorld to ClosedWorld (Closed)
Patch Set: Created 4 years, 3 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/container_type_mask.dart
diff --git a/pkg/compiler/lib/src/types/container_type_mask.dart b/pkg/compiler/lib/src/types/container_type_mask.dart
index acde3b2b13c8e32956c7758652de1b49f0bf7849..908996bc2d392a6dd23274dc2b01b6a403856324 100644
--- a/pkg/compiler/lib/src/types/container_type_mask.dart
+++ b/pkg/compiler/lib/src/types/container_type_mask.dart
@@ -50,13 +50,13 @@ class ContainerTypeMask extends ForwardingTypeMask {
length == other.length;
}
- TypeMask intersection(TypeMask other, ClassWorld classWorld) {
- TypeMask forwardIntersection = forwardTo.intersection(other, classWorld);
+ TypeMask intersection(TypeMask other, ClosedWorld closedWorld) {
+ TypeMask forwardIntersection = forwardTo.intersection(other, closedWorld);
if (forwardIntersection.isEmptyOrNull) return forwardIntersection;
return forwardIntersection.isNullable ? nullable() : nonNullable();
}
- TypeMask union(other, ClassWorld classWorld) {
+ TypeMask union(other, ClosedWorld closedWorld) {
if (this == other) {
return this;
} else if (equalsDisregardNull(other)) {
@@ -67,9 +67,9 @@ class ContainerTypeMask extends ForwardingTypeMask {
elementType != null &&
other.elementType != null) {
TypeMask newElementType =
- elementType.union(other.elementType, classWorld);
+ elementType.union(other.elementType, closedWorld);
int newLength = (length == other.length) ? length : null;
- TypeMask newForwardTo = forwardTo.union(other.forwardTo, classWorld);
+ TypeMask newForwardTo = forwardTo.union(other.forwardTo, closedWorld);
return new ContainerTypeMask(
newForwardTo,
allocationNode == other.allocationNode ? allocationNode : null,
@@ -79,7 +79,7 @@ class ContainerTypeMask extends ForwardingTypeMask {
newElementType,
newLength);
} else {
- return forwardTo.union(other, classWorld);
+ return forwardTo.union(other, closedWorld);
}
}

Powered by Google App Engine
This is Rietveld 408576698