blob: 66db0499d92ec70e53e826eda454ca43fb7306c5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
// |jit-test| skip-if: !('wasmLosslessInvoke' in this)
let bytecode = wasmTextToBinary(`(module
(func (export "f") (result i32)
i32.const 1
)
)`);
let g = newGlobal({sameCompartmentAs: wasmLosslessInvoke});
let m = new g.WebAssembly.Module(bytecode);
let i = new g.WebAssembly.Instance(m);
assertEq(i.exports.f(), 1);
assertEq(wasmLosslessInvoke(i.exports.f).value, 1);
|