8397365524
A ternary of the form `anything ? value : value` can be reduced to a comma-expression of the form `anything, value`. This seems like a rare case in real code, but it's easy enough to detect with our existing toolbox. The `anything` test-expression will be eliminated from the expression if it has no side effects, using our existing constant-folding rules for the comma expression. Change-Id: I1285b04cd6a08f1bed614aa1aa6f37ea2447de91 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528439 Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: John Stiles <johnstiles@google.com> |
||
---|---|---|
.. | ||
ArrayFolding.sksl | ||
ArraySizeFolding.sksl | ||
AssignmentOps.sksl | ||
BoolFolding.sksl | ||
CastFolding.sksl | ||
FloatFolding.sksl | ||
IntFoldingES2.sksl | ||
IntFoldingES3.sksl | ||
MatrixFoldingES2.sksl | ||
MatrixFoldingES3.sksl | ||
Negation.sksl | ||
PreserveSideEffects.sksl | ||
SelfAssignment.sksl | ||
ShortCircuitBoolFolding.sksl | ||
SwitchCaseFolding.sksl | ||
SwizzleFolding.sksl | ||
TernaryFolding.sksl | ||
VectorScalarFolding.sksl | ||
VectorVectorFolding.sksl |