Debian Codegraph @

js/src/jit-test/tests/wasm/regress/bug1917807.js

raw
1 // |jit-test| --wasm-compiler=ion; --blinterp-eager
2
3 // Checks JIT exit parameters alignment.
4
5 function processWAST(source) {
6 let modBuf = wasmTextToBinary(source);
7 let module = new WebAssembly.Module(modBuf);
8 let instance = new WebAssembly.Instance(module);
9 for (let i = 0; i < 10; ++i) {
10 try {
11 instance.exports.odd();
12 } catch (e) {}
13 }
14 }
15
16 processWAST(`(module
17 (table 2 2 funcref)
18 (elem (i32.const 0) $odd $odd)
19 (type $t (func (param) (result i32)))
20 (func $odd (export "odd") (param i32 i32 i32 i32 i32 i32 i32) (result i32)
21 (return_call_indirect (type $t) (i32.const 1) (local.get 1))
22 ))`);