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
..
2021-06-04 20:41:47 +00:00
2021-07-06 10:20:19 +00:00
2021-06-09 14:32:14 +00:00
2021-06-24 11:27:36 +00:00
2021-06-09 14:32:14 +00:00
2021-04-15 17:47:23 +00:00
2021-06-24 11:27:36 +00:00
2021-04-16 19:07:51 +00:00
2021-09-02 13:49:59 +00:00
2021-09-02 13:49:59 +00:00
2021-09-02 13:49:59 +00:00
2021-04-15 17:47:23 +00:00
2021-06-24 11:27:36 +00:00
2021-04-16 19:07:51 +00:00
2021-08-23 15:16:42 +00:00
2021-06-17 15:48:39 +00:00
2021-06-17 15:48:39 +00:00
2021-06-17 15:48:39 +00:00
2021-04-15 17:47:23 +00:00
2021-06-24 11:27:36 +00:00
2021-04-16 19:07:51 +00:00
2021-05-10 18:27:31 +00:00
2021-06-09 18:53:57 +00:00
2021-06-09 18:53:57 +00:00
2021-05-05 09:09:41 +00:00
2021-06-24 11:27:36 +00:00
2021-05-20 15:10:48 +00:00
2021-04-15 17:47:23 +00:00
2021-06-24 11:27:36 +00:00
2021-04-16 19:07:51 +00:00
2021-05-10 18:27:31 +00:00
2021-04-28 13:50:43 +00:00
2021-04-28 13:50:43 +00:00
2021-06-04 20:41:47 +00:00
2021-04-20 15:04:21 +00:00
2021-04-20 15:04:21 +00:00
2021-03-10 11:41:49 +00:00
2021-04-16 19:07:51 +00:00
2021-04-16 19:07:51 +00:00
2021-05-10 18:27:31 +00:00
2021-06-09 18:53:57 +00:00
2021-06-09 18:53:57 +00:00
2021-07-19 21:32:27 +00:00
2021-07-19 21:32:27 +00:00
2021-04-15 17:47:23 +00:00
2021-06-24 11:27:36 +00:00
2021-05-22 12:42:14 +00:00
2021-04-15 17:47:23 +00:00
2021-06-24 11:27:36 +00:00
2021-04-16 19:07:51 +00:00
2021-04-28 13:50:43 +00:00
2021-06-24 11:27:36 +00:00
2021-04-16 19:07:51 +00:00
2021-04-13 23:27:27 +00:00
2021-04-13 23:27:27 +00:00
2021-03-10 11:41:49 +00:00
2021-04-16 19:07:51 +00:00
2021-04-16 19:07:51 +00:00
2021-03-11 17:39:32 +00:00
2021-06-09 18:53:57 +00:00
2021-07-26 22:19:48 +00:00
2021-07-26 22:19:48 +00:00
2021-07-26 22:19:48 +00:00
2021-06-04 20:41:47 +00:00
2021-06-24 11:27:36 +00:00
2021-04-20 15:04:21 +00:00
2021-07-27 08:17:29 +00:00
2021-07-27 08:17:29 +00:00
2021-03-10 11:41:49 +00:00
2021-04-16 19:07:51 +00:00
2021-04-16 19:07:51 +00:00
2021-04-15 17:47:23 +00:00
2021-06-24 11:27:36 +00:00
2021-04-16 19:07:51 +00:00
2021-04-16 19:07:51 +00:00
2021-04-19 22:54:43 +00:00
2021-06-04 20:41:47 +00:00
2021-04-26 14:55:25 +00:00
2021-04-26 14:55:25 +00:00
2021-06-04 20:41:47 +00:00
2021-04-20 15:04:21 +00:00
2021-04-20 15:04:21 +00:00
2021-03-10 11:41:49 +00:00
2021-04-16 19:07:51 +00:00
2021-04-16 19:07:51 +00:00
2021-05-10 18:27:31 +00:00
2021-04-28 13:50:43 +00:00
2021-04-28 13:50:43 +00:00
2021-07-02 19:27:42 +00:00
2021-07-02 19:27:42 +00:00
2021-07-02 19:27:42 +00:00
2021-06-04 20:41:47 +00:00
2021-06-24 11:27:36 +00:00
2021-05-20 15:10:48 +00:00
2021-05-10 18:27:31 +00:00
2021-06-09 18:53:57 +00:00
2021-06-09 18:53:57 +00:00
2021-06-04 20:41:47 +00:00
2021-04-20 15:04:21 +00:00
2021-04-20 15:04:21 +00:00
2021-06-29 22:07:05 +00:00
2021-06-24 11:27:36 +00:00
2021-07-22 13:24:59 +00:00
2021-04-15 17:47:23 +00:00
2021-06-24 11:27:36 +00:00
2021-04-16 19:07:51 +00:00
2021-04-28 13:50:43 +00:00
2021-04-28 13:50:43 +00:00
2021-05-19 13:40:08 +00:00
2021-07-27 08:17:29 +00:00
2021-06-09 18:53:57 +00:00
2021-06-28 18:20:23 +00:00
2021-06-28 18:20:23 +00:00
2021-06-28 18:20:23 +00:00
2021-08-21 08:50:40 +00:00
2021-08-21 08:50:40 +00:00
2021-07-12 11:44:51 +00:00
2021-07-12 11:44:51 +00:00
2021-07-12 11:44:51 +00:00
2021-04-28 13:50:43 +00:00
2021-04-28 13:50:43 +00:00
2021-05-10 18:27:31 +00:00
2021-06-09 18:53:57 +00:00
2021-06-09 18:53:57 +00:00
2021-04-15 17:47:23 +00:00
2021-06-24 11:27:36 +00:00
2021-04-16 19:07:51 +00:00
2021-06-04 20:41:47 +00:00
2021-07-13 12:18:13 +00:00
2021-04-20 15:04:21 +00:00
2021-04-15 17:47:23 +00:00
2021-06-24 11:27:36 +00:00
2021-04-16 19:07:51 +00:00
2021-07-28 22:43:36 +00:00
2021-06-16 09:19:36 +00:00
2021-06-24 11:27:36 +00:00
2021-06-09 14:32:14 +00:00
2021-06-04 20:41:47 +00:00
2021-06-24 11:27:36 +00:00
2021-04-20 15:04:21 +00:00
2021-04-16 19:07:51 +00:00
2021-04-19 22:51:23 +00:00
2021-05-13 20:11:22 +00:00
2021-06-09 18:53:57 +00:00
2021-06-09 18:53:57 +00:00
2020-03-02 15:47:43 -05:00
2021-04-09 16:51:38 +00:00
2021-06-04 22:17:37 +00:00
2021-06-04 22:17:37 +00:00
2021-06-04 22:17:37 +00:00
2021-04-15 17:47:23 +00:00
2021-06-24 11:27:36 +00:00
2021-04-16 19:07:51 +00:00
2021-06-04 20:41:47 +00:00
2021-06-24 11:27:36 +00:00
2021-04-26 14:19:55 +00:00
2021-06-04 20:41:47 +00:00
2021-04-20 15:04:21 +00:00
2021-04-20 15:04:21 +00:00
2021-04-28 13:50:43 +00:00
2021-06-24 11:27:36 +00:00
2021-04-16 19:07:51 +00:00
2021-05-10 18:27:31 +00:00
2021-04-28 13:50:43 +00:00
2021-04-28 13:50:43 +00:00
2021-05-10 18:27:31 +00:00
2021-06-09 18:53:57 +00:00
2021-06-09 18:53:57 +00:00
2021-04-13 23:27:27 +00:00
2021-04-13 23:27:27 +00:00
2021-05-10 19:16:46 +00:00
2021-05-10 19:16:46 +00:00
2021-06-04 20:41:47 +00:00
2021-06-04 20:41:47 +00:00
2021-06-04 20:41:47 +00:00
2021-05-10 18:27:31 +00:00
2021-06-09 18:53:57 +00:00
2021-06-09 18:53:57 +00:00
2021-06-09 18:53:57 +00:00
2021-06-09 18:53:57 +00:00
2021-05-10 18:27:31 +00:00
2021-06-09 18:53:57 +00:00
2021-06-09 18:53:57 +00:00
2021-05-10 18:27:31 +00:00
2021-06-09 18:53:57 +00:00
2021-06-09 18:53:57 +00:00
2021-05-10 18:27:31 +00:00
2021-06-09 18:53:57 +00:00
2021-06-09 18:53:57 +00:00
2021-05-05 09:09:41 +00:00
2021-06-24 11:27:36 +00:00
2021-05-20 15:10:48 +00:00
2021-06-09 14:32:14 +00:00
2021-06-24 11:27:36 +00:00
2021-06-09 14:32:14 +00:00
2021-04-28 13:50:43 +00:00
2021-06-24 11:27:36 +00:00
2021-04-16 19:07:51 +00:00
2021-04-09 16:51:38 +00:00
2021-04-20 15:04:21 +00:00
2021-04-20 15:04:21 +00:00
2021-05-21 20:25:53 +00:00
2021-05-05 09:09:41 +00:00
2021-06-24 11:27:36 +00:00
2021-05-20 15:10:48 +00:00
2021-06-24 11:27:36 +00:00
2021-06-09 14:32:14 +00:00
2021-04-28 13:39:53 +00:00
2021-04-23 15:41:34 +00:00
2021-05-10 18:06:31 +00:00
2021-06-04 20:41:47 +00:00
2021-04-20 15:04:21 +00:00
2021-04-20 15:04:21 +00:00
2021-05-10 18:27:31 +00:00
2021-04-28 13:50:43 +00:00
2021-04-28 13:50:43 +00:00
2021-04-15 17:47:23 +00:00
2021-06-24 11:27:36 +00:00
2021-04-16 19:07:51 +00:00
2021-06-17 08:35:54 +00:00
2021-06-17 08:35:54 +00:00
2021-06-04 20:41:47 +00:00
2021-06-24 11:27:36 +00:00
2021-04-16 19:07:51 +00:00
2021-06-04 20:41:47 +00:00
2021-06-24 11:27:36 +00:00
2021-06-04 20:41:47 +00:00
2021-06-04 20:41:47 +00:00
2021-07-13 12:18:13 +00:00
2021-04-26 14:19:55 +00:00
2021-04-20 15:04:21 +00:00
2021-04-20 15:04:21 +00:00
2021-05-19 13:40:08 +00:00
2021-06-09 18:53:57 +00:00
2021-07-30 11:23:06 +00:00