binaryen
binaryen copied to clipboard
Fuzzer: Add a pass to prune illegal imports and exports for JS
We already have passes to legalize i64 imports and exports, which the fuzzer will run so that we can run wasm files in JS VMs. SIMD and multivalue also pose a problem as they trap on the boundary. In principle we could legalize them as well, but that is substantial effort, so instead just prune them: given a wasm module, remove any imports or exports that use SIMD or multivalue (or anything else that is not legal for JS).
Running this in the fuzzer will allow us to not skip running v8 on any testcase we enable SIMD and multivalue for.
Also remove the limitation on running v8 with multimemory (v8 now supports that).