diff options
Diffstat (limited to '')
-rw-r--r-- | js/src/jit-test/tests/wasm/regress/builtin-import-sigs.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/wasm/regress/builtin-import-sigs.js b/js/src/jit-test/tests/wasm/regress/builtin-import-sigs.js new file mode 100644 index 0000000000..50aa2a41d1 --- /dev/null +++ b/js/src/jit-test/tests/wasm/regress/builtin-import-sigs.js @@ -0,0 +1,15 @@ +var code = wasmTextToBinary(`(module + (import "" "builtin" (func $one)) + (import "" "builtin" (func $two (param i32))) + (import "" "builtin" (func $three (result i32))) + (import "" "builtin" (func $four (param f32 f32 f32 f32 f32 f32 f32 f32 f32 f32 f32 f32) (result f32))) + (func (export "run") + (call $one) + (call $two (i32.const 0)) + (drop (call $three)) + (drop (call $four (f32.const 0) (f32.const 0) (f32.const 0) (f32.const 0) (f32.const 0) (f32.const 0) (f32.const 0) (f32.const 0) (f32.const 0) (f32.const 0) (f32.const 0) (f32.const 0))) + ) +)`); +var m = new WebAssembly.Module(code); +var i = new WebAssembly.Instance(m, {'':{builtin:Math.sin}}); +i.exports.run(); |