dawn-cmake/src/resolver
James Price 4cc4315d6c Allow array size to be a module-scope constant
Change ast::Array to use an ast::Expression for its `size` field. The
WGSL frontend now parses the array size as an `primary_expression`,
and the Resolver is responsible for validating the expression is a
signed or unsigned integer, and either a literal or a non-overridable
module-scope constant.

The Resolver evaluates the constant value of the size expression, and
so the resolved sem::Array type still has a constant size as before.

Fixed: tint:1068
Fixed: tint:1117

Change-Id: Icfa141482ea1e47ea8c21a25e9eb48221f176e9a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/63061
Auto-Submit: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-09-02 13:49:59 +00:00
..
assignment_validation_test.cc Allow array size to be a module-scope constant 2021-09-02 13:49:59 +00:00
atomics_test.cc resolver: Resolve atomic types 2021-06-17 19:56:14 +00:00
atomics_validation_test.cc validation: disallow atomic type constructors 2021-08-13 15:20:42 +00:00
builtins_validation_test.cc validation: clean up function attributes validation and unit-tests 2021-07-23 13:23:20 +00:00
call_test.cc resolver: Validate calls to void callables 2021-08-21 08:50:40 +00:00
call_validation_test.cc validation: validate function call pointer parameter 2021-07-20 18:14:02 +00:00
compound_statement_test.cc sem: Add CompoundStatement 2021-07-14 09:44:41 +00:00
control_block_validation_test.cc resolver: Resolve for-loops 2021-07-02 19:27:42 +00:00
decoration_validation_test.cc Allow array size to be a module-scope constant 2021-09-02 13:49:59 +00:00
entry_point_validation_test.cc validation: validate 'location' attribute when applied to struct members 2021-07-28 18:51:37 +00:00
function_validation_test.cc Allow array size to be a module-scope constant 2021-09-02 13:49:59 +00:00
host_shareable_validation_test.cc ast: Replace NamedType with TypeDecl 2021-06-09 14:32:14 +00:00
inferred_type_test.cc intrinsics: Add new struct form of modf(), frexp() 2021-07-23 16:43:01 +00:00
intrinsic_test.cc resolver: Validate calls to void callables 2021-08-21 08:50:40 +00:00
intrinsic_validation_test.cc resolver: Validate calls to void callables 2021-08-21 08:50:40 +00:00
is_host_shareable_test.cc Resolver: make IsConstructible non-recursive for arrays and struct members 2021-07-20 18:28:31 +00:00
is_storeable_test.cc Resolver: make IsConstructible non-recursive for arrays and struct members 2021-07-20 18:28:31 +00:00
pipeline_overridable_constant_test.cc sem: Split sem::Variable into global, local and parameter 2021-07-22 13:24:59 +00:00
ptr_ref_test.cc ast: Replace NamedType with TypeDecl 2021-06-09 14:32:14 +00:00
ptr_ref_validation_test.cc validation: pointer to handle is not allowed 2021-07-28 03:57:22 +00:00
resolver.cc Allow array size to be a module-scope constant 2021-09-02 13:49:59 +00:00
resolver.h resolver: Validate that entry points are not called 2021-08-31 16:14:46 +00:00
resolver_constants.cc sem: Rename `Vector::size()` to `Vector::Width()` 2021-07-22 18:31:34 +00:00
resolver_constants_test.cc sem: Rename `Vector::size()` to `Vector::Width()` 2021-07-22 18:31:34 +00:00
resolver_test.cc Allow array size to be a module-scope constant 2021-09-02 13:49:59 +00:00
resolver_test_helper.cc TestHelper: rename td_ to resolver_ 2021-03-16 16:31:33 +00:00
resolver_test_helper.h resolver: Validate vector types 2021-07-05 20:21:35 +00:00
storage_class_layout_validation_test.cc Reland "Validate storage class constraints" 2021-07-15 19:09:25 +00:00
storage_class_validation_test.cc validation: atomics access mode and storage class 2021-08-05 15:18:29 +00:00
struct_layout_test.cc validation: matrix element type must be 'f32' 2021-06-21 17:08:05 +00:00
struct_pipeline_stage_use_test.cc validation: validate struct constructor 2021-07-09 16:32:00 +00:00
struct_storage_class_use_test.cc ast: Replace NamedType with TypeDecl 2021-06-09 14:32:14 +00:00
type_constructor_validation_test.cc Allow array size to be a module-scope constant 2021-09-02 13:49:59 +00:00
type_validation_test.cc Allow array size to be a module-scope constant 2021-09-02 13:49:59 +00:00
validation_test.cc resolver: Validate calls to void callables 2021-08-21 08:50:40 +00:00
var_let_test.cc ast: Replace NamedType with TypeDecl 2021-06-09 14:32:14 +00:00
var_let_validation_test.cc resolver: Validate storage class for var initializers 2021-08-27 14:54:47 +00:00