Descriptiondart2js cps_ir: BuiltinOperation improvements
Type propagation:
Added better type_propagation rules for various operators to detect more uint31/uint32/non-negative cases.
Moved the rules to per-operator code so the rules can be shared by invokes (e.g. '<') and the builtin operations they are lowered to (NumLt).
In the case of NumLt, this removes lower bounds checks from injected bounds checks (i.e. NumLt(index, 0)) for constant indexes by simple constant folding.
Bit operations:
The '>>> 0' coercion is often not needed.
If we can tell the result is in the uint31 range then the result
generated by JavaScript's bit operations will not have become
negative.
Added a tree analysis to codegen to tell if the result fits in uint31.
This works quite well and removes about as many coercions as SSA.
It misses some coercions due to lack of type information in tree_ir.
Added missing operators:
NumShr aka '>>>', valid on limited inputs.
NumDiv (Seems like a simple omission, boost some math code)
NumTruncatingDivideToSigned32
R=asgerf@google.com
Committed: https://github.com/dart-lang/sdk/commit/5ac49b5f2959f1c017d6e08a9420e14a897d8e09
Patch Set 1 : #Patch Set 2 : #
Messages
Total messages: 6 (3 generated)
|