From ae4800bebd0d479813d99e31e098296c9167e34a Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Thu, 11 Jul 2024 17:25:54 -0400 Subject: [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. --- test/spec/shared-polymorphism.wast | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test/spec') 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)) + ) ) -- cgit v1.2.3