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

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

Issue 1159713003: Trust inferred type when propagating types in the SSA backend. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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 | « no previous file | no next file » | 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 71abe6c3ed5bfa4df8dbb65ad9df38538f69b6fe..0aa5f0fe9bb3c53d3c058c43b40a5c2edf41c138 100644
--- a/pkg/compiler/lib/src/ssa/types_propagation.dart
+++ b/pkg/compiler/lib/src/ssa/types_propagation.dart
@@ -343,10 +343,10 @@ class SsaTypePropagator extends HBaseVisitor implements OptimizationPhase {
}
HInstruction receiver = instruction.getDartReceiver(compiler);
- TypeMask receiverType = receiver.instructionType;
- Selector selector =
- new TypedSelector(receiverType, instruction.selector, classWorld);
- instruction.selector = selector;
+ Selector selector = instruction.selector;
+ TypeMask receiverType = selector is TypedSelector
+ ? selector.mask.intersection(receiver.instructionType, classWorld)
+ : receiver.instructionType;
// Try to specialize the receiver after this call.
if (receiver.dominatedUsers(instruction).length != 1
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698