diff options
author | Thomas Lively <tlively@google.com> | 2024-08-21 10:39:09 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-21 10:39:09 -0700 |
commit | 7889abf8137291cc591cac8f38570789ebaf354d (patch) | |
tree | 135b0de5f6ab7c696cfe0796f4a2f4b98901aabe /scripts/test/wasm2js.py | |
parent | adf53b3b7606a16988b548fe5423b0272913a05a (diff) | |
download | binaryen-7889abf8137291cc591cac8f38570789ebaf354d.tar.gz binaryen-7889abf8137291cc591cac8f38570789ebaf354d.tar.bz2 binaryen-7889abf8137291cc591cac8f38570789ebaf354d.zip |
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.
Diffstat (limited to 'scripts/test/wasm2js.py')
-rw-r--r-- | scripts/test/wasm2js.py | 1 |
1 files changed, 1 insertions, 0 deletions
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 ] |