Commit Graph

2 Commits

Author SHA1 Message Date
dan sinclair 46c32d882d Early out Is checks.
This CL adds a check to the `Is` castable methods to determine if the
target type is `final`. If the type being compared too is `final` we
bail out early in the walk up the hierarchy as it won't be a parent
class.

Change-Id: Ieba4dd686e47207a3db0cf3a8ea46fbc1a8d1c91
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/96600
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2022-07-20 15:53:14 +00:00
Ben Clayton 7ebcfc7e0e tint/transform: PromoteInitializersToLet
Rename PromoteInitializersToConstVar to PromoteInitializersToLet, and
implement promotion of 'const' variables that resolve to array types.

This is required, as the backends will inline variables that resolve to
'const' variables, and so we need to promote any 'const' values that
would emit an array constructor.

Bug: tint:1580
Change-Id: I1b7f5459512b0043385ba741d644ec776c912899
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94684
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-06-27 20:20:25 +00:00