diff options
author | Alon Zakai <azakai@google.com> | 2024-02-12 12:24:04 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-12 12:24:04 -0800 |
commit | 1e9838e7f9e3777e12e4f221a3281e73edce1c15 (patch) | |
tree | d78da770abc91f42b4937927b7ba4bd4a6f39ff9 /scripts/fuzz_shell.js | |
parent | 7e20a3b1bdc1a3d26b13c2597d0286c79851e9ac (diff) | |
download | binaryen-1e9838e7f9e3777e12e4f221a3281e73edce1c15.tar.gz binaryen-1e9838e7f9e3777e12e4f221a3281e73edce1c15.tar.bz2 binaryen-1e9838e7f9e3777e12e4f221a3281e73edce1c15.zip |
Fuzz shell: Add a j2wasm import (#6296)
With this, the fuzz shell can run a hello world Java file compiled by j2wasm.
Diffstat (limited to 'scripts/fuzz_shell.js')
-rw-r--r-- | scripts/fuzz_shell.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/fuzz_shell.js b/scripts/fuzz_shell.js index 217727c91..08864dfc7 100644 --- a/scripts/fuzz_shell.js +++ b/scripts/fuzz_shell.js @@ -174,6 +174,15 @@ var imports = { }, }; +// If Tags are available, add the import j2wasm expects. +if (typeof WebAssembly.Tag !== 'undefined') { + imports['imports'] = { + 'j2wasm.ExceptionUtils.tag': new WebAssembly.Tag({ + 'parameters': ['externref'] + }), + }; +} + imports = Asyncify.instrumentImports(imports); // Create the wasm. |