From 7889abf8137291cc591cac8f38570789ebaf354d Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Wed, 21 Aug 2024 10:39:09 -0700 Subject: Support `ref.extern n` in spec tests (#6858) Spec tests pass the value `ref.extern n`, where `n` is some integer, into exported functions that expect to receive externrefs and receive such values back out as return values. The payload serves to distinguish externrefs so the test can assert that the correct one was returned. Parse these values in wast scripts and represent them as externalized i31refs carrying the payload. We will need a different representation eventually, since some tests explicitly expect these externrefs to not be i31refs, but this suffices to get several new tests passing. To get the memory64 version of table_grow.wast passing, additionally fix the interpreter to handle growing 64-bit tables correctly. Delete the local versions of the upstream tests that can now be run successfully. --- scripts/test/wasm2js.py | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts/test/wasm2js.py') diff --git a/scripts/test/wasm2js.py b/scripts/test/wasm2js.py index f7c9bd479..d716e5fe6 100644 --- a/scripts/test/wasm2js.py +++ b/scripts/test/wasm2js.py @@ -30,6 +30,7 @@ assert_tests = ['wasm2js.wast.asserts'] wasm2js_skipped_tests = [ 'empty_imported_table.wast', 'br.wast', # depends on multivalue + 'br_table.wast', # needs support for externref in assert_return ] -- cgit v1.2.3