Allow constant folding some non-constant expressions
This requires removing the assumption that constant folding implies
constness in the constant expression sense from various places in the
code.
This particularly benefits ternary operators, which can now be simplified
if just the condition is a compile-time constant.
In the future, the groundwork that is laid here could be used to implement
more aggressive constant folding of user-defined functions for example.
TEST=angle_unittests
BUG=angleproject:851
Change-Id: I0eede806570d56746c3dad1e01aa89a91d66013d
Reviewed-on: https://chromium-review.googlesource.com/310750Reviewed-by:
Jamie Madill <jmadill@chromium.org>
Tested-by:
Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by:
Zhenyao Mo <zmo@chromium.org>
Showing
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to comment