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

Unified Diff: pkg/compiler/lib/src/ssa/interceptor_simplifier.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/ssa/interceptor_simplifier.dart
diff --git a/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart b/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart
index eafe01b614506fa671e9ae35334697362c9469f4..1716c7f9d20c9d51dadd730b0e2ce615e5e39ed2 100644
--- a/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart
+++ b/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart
@@ -11,7 +11,7 @@ import '../js_backend/backend_helpers.dart' show BackendHelpers;
import '../js_backend/js_backend.dart';
import '../types/types.dart';
import '../universe/selector.dart' show Selector;
-import '../world.dart' show ClassWorld;
+import '../world.dart' show ClosedWorld;
import 'nodes.dart';
import 'optimize.dart';
@@ -49,7 +49,7 @@ class SsaSimplifyInterceptors extends HBaseVisitor
BackendHelpers get helpers => backend.helpers;
- ClassWorld get classWorld => compiler.closedWorld;
+ ClosedWorld get closedWorld => compiler.closedWorld;
void visitGraph(HGraph graph) {
this.graph = graph;
@@ -109,8 +109,8 @@ class SsaSimplifyInterceptors extends HBaseVisitor
// All intercepted classes extend `Interceptor`, so if the receiver can't be
// a class extending `Interceptor` then it can be called directly.
- return new TypeMask.nonNullSubclass(helpers.jsInterceptorClass, classWorld)
- .isDisjoint(receiver.instructionType, classWorld);
+ return new TypeMask.nonNullSubclass(helpers.jsInterceptorClass, closedWorld)
+ .isDisjoint(receiver.instructionType, closedWorld);
}
HInstruction tryComputeConstantInterceptor(
@@ -145,17 +145,17 @@ class SsaSimplifyInterceptors extends HBaseVisitor
if (type.isNull) {
return helpers.jsNullClass;
}
- } else if (type.containsOnlyInt(classWorld)) {
+ } else if (type.containsOnlyInt(closedWorld)) {
return helpers.jsIntClass;
- } else if (type.containsOnlyDouble(classWorld)) {
+ } else if (type.containsOnlyDouble(closedWorld)) {
return helpers.jsDoubleClass;
- } else if (type.containsOnlyBool(classWorld)) {
+ } else if (type.containsOnlyBool(closedWorld)) {
return helpers.jsBoolClass;
- } else if (type.containsOnlyString(classWorld)) {
+ } else if (type.containsOnlyString(closedWorld)) {
return helpers.jsStringClass;
- } else if (type.satisfies(helpers.jsArrayClass, classWorld)) {
+ } else if (type.satisfies(helpers.jsArrayClass, closedWorld)) {
return helpers.jsArrayClass;
- } else if (type.containsOnlyNum(classWorld) &&
+ } else if (type.containsOnlyNum(closedWorld) &&
!interceptedClasses.contains(helpers.jsIntClass) &&
!interceptedClasses.contains(helpers.jsDoubleClass)) {
// If the method being intercepted is not defined in [int] or [double] we
@@ -174,7 +174,7 @@ class SsaSimplifyInterceptors extends HBaseVisitor
// for a subclass or call methods defined on a subclass. Provided the
// code is completely insensitive to the specific instance subclasses, we
// can use the non-leaf class directly.
- ClassElement element = type.singleClass(classWorld);
+ ClassElement element = type.singleClass(closedWorld);
if (element != null && backend.isNative(element)) {
return element;
}

Powered by Google App Engine
This is Rietveld 408576698