DescriptionVM: Fix bug in constant propagation.
The optimizer runs constant propagation once before inserting boxing- and unboxing
conversions. Therefore, operations that take unboxed input operands may still have
mismatched representations.
This has to be considered so that no invalid 'unknown' constants appear during propagation.
The invariant during constant propagation is that if all inputs of an operation
are known (constant or non-constant), the output must be known (constant or
non-constant. It must not become unknown in these cases.
i.e. the input of a MintToDouble/Int32ToDouble/SmiToDouble could be a double constant at
this stage. This can occur as a result of polymorphic inlining of arithmetic operations on
constants, where some variants are unreachable.
For now, the solution is to mark the operation as non-constant.
(the inserted conversion would always deoptimize - making the operation unreachable)
BUG=
R=johnmccutchan@google.com
Committed: https://github.com/dart-lang/sdk/commit/0df00193f77e4545850d502a1d26ffeff0e6e4fc
Patch Set 1 #
Messages
Total messages: 4 (1 generated)
|