mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-13 00:26:00 +00:00
Move the bulk of the constant evaulation logic out of transform::FoldConstants and into Resolver and sem::Expression. transform::FoldConstants now replace TypeConstructor nodes that have a constant value on the expression. This is ground work to: * Cleaning up the HLSL uniform buffer indexing, which is `/` and `%` arithmatic heavy * Prepares us to handle `constexpr` when it lands in the spec * Provide a centralized place to do constant evaluation, instead of the having similar logic scattered around the codebase. Change-Id: I3e2f542be692046a8d243b62a82556db519953e7 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/57426 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Antonio Maiorano <amaiorano@google.com> Reviewed-by: James Price <jrprice@google.com>