DescriptionVM: Constant fold more loads from constants in the optimizer.
We have limited support for folding away length loads from constant
arrays and strings. However we were not folding away loads in code
like:
enum E { V }
isV(flags) => (flags & (1 << E.V.index)) != 0;
Here we would emit load index and shift for mask computation
instead of simply emitting 1.
This change fixes the oversight by enabling folding away loads
of final fields from constants.
BUG=
R=erikcorry@google.com
Committed: https://github.com/dart-lang/sdk/commit/746ab58f4623372e1efcfd04644927f16dd0fab7
Patch Set 1 #
Messages
Total messages: 5 (2 generated)
|