diff options
author | Thomas Lively <tlively@google.com> | 2024-06-14 12:07:44 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-14 19:07:44 +0000 |
commit | 0fa99fb09b881985cf94e74b8c0b339bdef61be6 (patch) | |
tree | 81d1a340dc17a55e6b611962807dd34599757651 /test/lit/validation | |
parent | 000fa2a8ac8dd66b8ca53b0451702966d59da4d0 (diff) | |
download | binaryen-0fa99fb09b881985cf94e74b8c0b339bdef61be6.tar.gz binaryen-0fa99fb09b881985cf94e74b8c0b339bdef61be6.tar.bz2 binaryen-0fa99fb09b881985cf94e74b8c0b339bdef61be6.zip |
[threads] Add a "shared-everything" feature (#6658)
Add the feature and flags to enable and disable it. Require the new feature to
be enabled for shared heap types to validate. To make the test work, update the
validator to actually check features for global types.
Diffstat (limited to 'test/lit/validation')
-rw-r--r-- | test/lit/validation/shared-struct.wast | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/lit/validation/shared-struct.wast b/test/lit/validation/shared-struct.wast new file mode 100644 index 000000000..ee25b6f24 --- /dev/null +++ b/test/lit/validation/shared-struct.wast @@ -0,0 +1,12 @@ +;; Test that shared structs require shared-everything threads + +;; RUN: not wasm-opt %s 2>&1 | filecheck %s --check-prefix NO-SHARED +;; RUN: wasm-opt %s --enable-reference-types --enable-gc --enable-shared-everything -o - -S | filecheck %s --check-prefix SHARED + +;; NO-SHARED: global type requires additional features [--enable-reference-types --enable-gc --enable-shared-everything] +;; SHARED: (type $t (shared (struct ))) + +(module + (type $t (shared (struct))) + (global (import "" "") (ref null $t)) +) |