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

Unified Diff: pkg/compiler/lib/src/ssa/types_propagation.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/types.dart ('k') | pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/types_propagation.dart
diff --git a/pkg/compiler/lib/src/ssa/types_propagation.dart b/pkg/compiler/lib/src/ssa/types_propagation.dart
index 85564723d9a72109ea6bf4906b45663d38e90e0a..71abe6c3ed5bfa4df8dbb65ad9df38538f69b6fe 100644
--- a/pkg/compiler/lib/src/ssa/types_propagation.dart
+++ b/pkg/compiler/lib/src/ssa/types_propagation.dart
@@ -252,8 +252,7 @@ class SsaTypePropagator extends HBaseVisitor implements OptimizationPhase {
return true;
} else if (instruction.element == null) {
Iterable<Element> targets =
- compiler.world.allFunctions.filter(
- instruction.selector, instruction.mask);
+ compiler.world.allFunctions.filter(instruction.selector);
if (targets.length == 1) {
Element target = targets.first;
ClassElement cls = target.enclosingClass;
@@ -336,8 +335,7 @@ class SsaTypePropagator extends HBaseVisitor implements OptimizationPhase {
if (checkReceiver(instruction)) {
addAllUsersBut(instruction, instruction.inputs[1]);
}
- if (!selector.isUnaryOperator &&
- checkArgument(instruction)) {
+ if (!selector.isUnaryOperator && checkArgument(instruction)) {
addAllUsersBut(instruction, instruction.inputs[2]);
}
}
@@ -346,13 +344,14 @@ class SsaTypePropagator extends HBaseVisitor implements OptimizationPhase {
HInstruction receiver = instruction.getDartReceiver(compiler);
TypeMask receiverType = receiver.instructionType;
- instruction.mask = receiverType;
+ Selector selector =
+ new TypedSelector(receiverType, instruction.selector, classWorld);
+ instruction.selector = selector;
// Try to specialize the receiver after this call.
if (receiver.dominatedUsers(instruction).length != 1
- && !instruction.selector.isClosureCall) {
- TypeMask newType = compiler.world.allFunctions.receiverType(
- instruction.selector, instruction.mask);
+ && !selector.isClosureCall) {
+ TypeMask newType = compiler.world.allFunctions.receiverType(selector);
newType = newType.intersection(receiverType, classWorld);
var next = instruction.next;
if (next is HTypeKnown && next.checkedInput == receiver) {
« no previous file with comments | « pkg/compiler/lib/src/ssa/types.dart ('k') | pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698