Index: sdk/lib/_internal/compiler/implementation/ssa/optimize.dart |
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart b/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart |
index 96fe78738dc144d18a5e7e87e7e3f04b4a061ee3..894ef79ffa6c30b28f447ee55d340a5f23c5d460 100644 |
--- a/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart |
+++ b/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart |
@@ -894,9 +894,13 @@ class SsaDeadCodeEliminator extends HGraphVisitor implements OptimizationPhase { |
HInstruction zapInstructionCache; |
HInstruction get zapInstruction { |
- return (zapInstructionCache == null) |
- ? zapInstructionCache = analyzer.graph.addConstantInt(0, compiler) |
- : zapInstructionCache; |
+ if (zapInstructionCache == null) { |
+ // A constant with no type does not pollute types at phi nodes. |
+ Constant constant = |
+ new DummyReceiverConstant(const TypeMask.nonNullEmpty()); |
+ zapInstructionCache = analyzer.graph.addConstant(constant, compiler); |
+ } |
+ return zapInstructionCache; |
} |
/// Returns whether the next throwing instruction that may have side |