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.glsl | ||
ArraySizeFolding.glsl | ||
AssignmentOps.glsl | ||
BoolFolding.glsl | ||
CastFolding.glsl | ||
FloatFolding.glsl | ||
IntFoldingES2.glsl | ||
IntFoldingES3.glsl | ||
MatrixFoldingES2.glsl | ||
MatrixFoldingES3.glsl | ||
Negation.glsl | ||
PreserveSideEffects.glsl | ||
SelfAssignment.glsl | ||
ShortCircuitBoolFolding.glsl | ||
SwitchCaseFolding.glsl | ||
SwizzleFolding.glsl | ||
TernaryFolding.glsl | ||
VectorScalarFolding.glsl | ||
VectorVectorFolding.glsl |