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

Unified Diff: pkg/compiler/lib/src/ssa/interceptor_simplifier.dart

Issue 2563443007: Reduce use of Compiler.closedWorld (Closed)
Patch Set: Created 4 years 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 1716c7f9d20c9d51dadd730b0e2ce615e5e39ed2..d35ee860e53a50310f0f177d0b936f60aad897e8 100644
--- a/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart
+++ b/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart
@@ -97,7 +97,7 @@ class SsaSimplifyInterceptors extends HBaseVisitor
bool canUseSelfForInterceptor(
HInstruction receiver, Set<ClassElement> interceptedClasses) {
- if (receiver.canBePrimitive(compiler)) {
+ if (receiver.canBePrimitive(closedWorld)) {
// Primitives always need interceptors.
return false;
}
@@ -312,9 +312,9 @@ class SsaSimplifyInterceptors extends HBaseVisitor
if (receiver.canBeNull()) {
if (!interceptedClasses.contains(helpers.jsNullClass)) {
// Can use `(receiver && C)` only if receiver is either null or truthy.
- if (!(receiver.canBePrimitiveNumber(compiler) ||
- receiver.canBePrimitiveBoolean(compiler) ||
- receiver.canBePrimitiveString(compiler))) {
+ if (!(receiver.canBePrimitiveNumber(closedWorld) ||
+ receiver.canBePrimitiveBoolean(closedWorld) ||
+ receiver.canBePrimitiveString(closedWorld))) {
ClassElement interceptorClass = tryComputeConstantInterceptorFromType(
receiver.instructionType.nonNullable(), interceptedClasses);
if (interceptorClass != null) {
« no previous file with comments | « pkg/compiler/lib/src/ssa/graph_builder.dart ('k') | pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698