From 0fa99fb09b881985cf94e74b8c0b339bdef61be6 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Fri, 14 Jun 2024 12:07:44 -0700 Subject: [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. --- test/lit/validation/shared-struct.wast | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test/lit/validation/shared-struct.wast (limited to 'test/lit/validation') 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)) +) -- cgit v1.2.3