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

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

Issue 1182053010: Revert "Split TypedSelector into Selector and TypeMask." (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « pkg/compiler/lib/src/ssa/interceptor_simplifier.dart ('k') | pkg/compiler/lib/src/ssa/nodes.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 be3406f3ee4a243141bdc05a13aebef62f34b564..dbc5e5f1927777336c87930863b8b1c69104f103 100644
--- a/pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart
+++ b/pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart
@@ -15,8 +15,8 @@ class InvokeDynamicSpecializer {
TypeMask computeTypeFromInputTypes(HInvokeDynamic instruction,
Compiler compiler) {
- return TypeMaskFactory.inferredTypeForSelector(
- instruction.selector, instruction.mask, compiler);
+ Selector selector = instruction.selector;
+ return TypeMaskFactory.inferredTypeForSelector(selector, compiler);
}
HInstruction tryConvertToBuiltin(HInvokeDynamic instruction,
@@ -113,8 +113,9 @@ class IndexSpecializer extends InvokeDynamicSpecializer {
}
TypeMask receiverType =
instruction.getDartReceiver(compiler).instructionType;
- TypeMask type = TypeMaskFactory.inferredTypeForSelector(
- instruction.selector, receiverType, compiler);
+ Selector refined = new TypedSelector(receiverType, instruction.selector,
+ compiler.world);
+ TypeMask type = TypeMaskFactory.inferredTypeForSelector(refined, compiler);
return new HIndex(
instruction.inputs[1], instruction.inputs[2],
instruction.selector, type);
@@ -238,9 +239,12 @@ abstract class BinaryArithmeticSpecializer extends InvokeDynamicSpecializer {
Compiler compiler) {
if (selector.name == name) return selector;
JavaScriptBackend backend = compiler.backend;
- return new Selector(
+ Selector newSelector = new Selector(
SelectorKind.CALL, new Name(name, backend.interceptorsLibrary),
new CallStructure(selector.argumentCount));
+ return selector.mask == null
+ ? newSelector
+ : new TypedSelector(selector.mask, newSelector, compiler.world);
}
}
@@ -665,9 +669,10 @@ class EqualsSpecializer extends RelationalSpecializer {
return newBuiltinVariant(instruction, compiler);
}
World world = compiler.world;
+ Selector selector =
+ new TypedSelector(instructionType, instruction.selector, world);
JavaScriptBackend backend = compiler.backend;
- Iterable<Element> matches = world.allFunctions.filter(
- instruction.selector, instructionType);
+ Iterable<Element> matches = world.allFunctions.filter(selector);
// This test relies the on `Object.==` and `Interceptor.==` always being
// implemented because if the selector matches by subtype, it still will be
// a regular object or an interceptor.
« no previous file with comments | « pkg/compiler/lib/src/ssa/interceptor_simplifier.dart ('k') | pkg/compiler/lib/src/ssa/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698