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

Unified Diff: pkg/compiler/lib/src/inferrer/type_graph_nodes.dart

Issue 2363773005: Move closed world reasoning methods 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/inferrer/type_graph_nodes.dart
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
index 833f611a2e1c10635227f279ff6a31bfea315558..98e12bea5be9eaf25ce07cfb09eadfe5c42b812f 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
@@ -867,7 +867,7 @@ class DynamicCallSiteTypeInformation extends CallSiteTypeInformation {
*/
TypeInformation handleIntrisifiedSelector(
Selector selector, TypeMask mask, TypeGraphInferrerEngine inferrer) {
- ClassWorld classWorld = inferrer.classWorld;
+ ClassWorld classWorld = inferrer.closedWorld;
if (!classWorld.backend.intImplementation.isResolved) return null;
if (mask == null) return null;
if (!mask.containsOnlyInt(classWorld)) {
@@ -1277,10 +1277,10 @@ class NarrowTypeInformation extends TypeInformation {
TypeMask computeType(TypeGraphInferrerEngine inferrer) {
TypeMask input = assignments.first.type;
TypeMask intersection =
- input.intersection(typeAnnotation, inferrer.classWorld);
+ input.intersection(typeAnnotation, inferrer.closedWorld);
if (debug.ANOMALY_WARN) {
- if (!input.containsMask(intersection, inferrer.classWorld) ||
- !typeAnnotation.containsMask(intersection, inferrer.classWorld)) {
+ if (!input.containsMask(intersection, inferrer.closedWorld) ||
+ !typeAnnotation.containsMask(intersection, inferrer.closedWorld)) {
print("ANOMALY WARNING: narrowed $input to $intersection via "
"$typeAnnotation");
}
@@ -1516,7 +1516,7 @@ class MapTypeInformation extends TypeInformation with TracedTypeInformation {
for (var key in typeInfoMap.keys) {
TypeInformation value = typeInfoMap[key];
if (!mask.typeMap.containsKey(key) &&
- !value.type.containsAll(inferrer.classWorld) &&
+ !value.type.containsAll(inferrer.closedWorld) &&
!value.type.isNullable) {
return toTypeMask(inferrer);
}

Powered by Google App Engine
This is Rietveld 408576698