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

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

Issue 2569733002: Even less reliance on Compiler.closedWorld (Closed)
Patch Set: Updated cf. comments. 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/invoke_dynamic_specializers.dart
diff --git a/pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart b/pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart
index e4137488cbe3b8b1fb8d7def2fa81e2ccc13f29e..e2536a5d03a7e52b82495a6da2f0d1d2e4eec59c 100644
--- a/pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart
+++ b/pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart
@@ -25,8 +25,8 @@ class InvokeDynamicSpecializer {
TypeMask computeTypeFromInputTypes(
HInvokeDynamic instruction, Compiler compiler, ClosedWorld closedWorld) {
- return TypeMaskFactory.inferredTypeForSelector(
- instruction.selector, instruction.mask, compiler);
+ return TypeMaskFactory.inferredTypeForSelector(instruction.selector,
+ instruction.mask, compiler.globalInference.results);
}
HInstruction tryConvertToBuiltin(
@@ -111,9 +111,9 @@ class IndexSpecializer extends InvokeDynamicSpecializer {
return null;
}
TypeMask receiverType =
- instruction.getDartReceiver(compiler).instructionType;
+ instruction.getDartReceiver(closedWorld).instructionType;
TypeMask type = TypeMaskFactory.inferredTypeForSelector(
- instruction.selector, receiverType, compiler);
+ instruction.selector, receiverType, compiler.globalInference.results);
return new HIndex(instruction.inputs[1], instruction.inputs[2],
instruction.selector, type);
}
@@ -754,7 +754,7 @@ class CodeUnitAtSpecializer extends InvokeDynamicSpecializer {
HInvokeDynamic instruction, Compiler compiler, ClosedWorld closedWorld) {
// TODO(sra): Implement a builtin HCodeUnitAt instruction and the same index
// bounds checking optimizations as for HIndex.
- HInstruction receiver = instruction.getDartReceiver(compiler);
+ HInstruction receiver = instruction.getDartReceiver(closedWorld);
if (receiver.isStringOrNull(closedWorld)) {
// Even if there is no builtin equivalent instruction, we know
// String.codeUnitAt does not have any side effect (other than throwing),
@@ -774,7 +774,7 @@ class RoundSpecializer extends InvokeDynamicSpecializer {
HInstruction tryConvertToBuiltin(
HInvokeDynamic instruction, Compiler compiler, ClosedWorld closedWorld) {
- HInstruction receiver = instruction.getDartReceiver(compiler);
+ HInstruction receiver = instruction.getDartReceiver(closedWorld);
if (receiver.isNumberOrNull(closedWorld)) {
// Even if there is no builtin equivalent instruction, we know the
// instruction does not have any side effect, and that it can be GVN'ed.
« no previous file with comments | « pkg/compiler/lib/src/ssa/interceptor_simplifier.dart ('k') | pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698