summaryrefslogtreecommitdiff
path: root/test/spec
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2024-07-11 17:25:54 -0400
committerGitHub <noreply@github.com>2024-07-11 14:25:54 -0700
commitae4800bebd0d479813d99e31e098296c9167e34a (patch)
treee675041374e8411372b21ca3f6551a13acd63170 /test/spec
parentc64ac5d5a676fdbb9b108e0ad16c293a32a9b611 (diff)
downloadbinaryen-ae4800bebd0d479813d99e31e098296c9167e34a.tar.gz
binaryen-ae4800bebd0d479813d99e31e098296c9167e34a.tar.bz2
binaryen-ae4800bebd0d479813d99e31e098296c9167e34a.zip
[threads] Shared polymorphism for extern conversions (#6730)
`any.convert_extern` and `extern.convert_any` return references to shared heap types iff their operands are references to shared heap types.
Diffstat (limited to 'test/spec')
-rw-r--r--test/spec/shared-polymorphism.wast13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/spec/shared-polymorphism.wast b/test/spec/shared-polymorphism.wast
index 547829f11..be8b5e467 100644
--- a/test/spec/shared-polymorphism.wast
+++ b/test/spec/shared-polymorphism.wast
@@ -9,4 +9,17 @@
(func (param (ref null (shared i31))) (drop (i31.get_u (local.get 0))))
(func (param (ref null (shared array))) (drop (array.len (local.get 0))))
+
+ (func (param (ref null (shared extern))) (result (ref null (shared any)))
+ (any.convert_extern (local.get 0))
+ )
+ (func (param (ref (shared extern))) (result (ref (shared any)))
+ (any.convert_extern (local.get 0))
+ )
+ (func (param (ref null (shared any))) (result (ref null (shared extern)))
+ (extern.convert_any (local.get 0))
+ )
+ (func (param (ref (shared any))) (result (ref (shared extern)))
+ (extern.convert_any (local.get 0))
+ )
)