tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

builtin-import-sigs.js (718B)


      1 var code = wasmTextToBinary(`(module
      2    (import "" "builtin" (func $one))
      3    (import "" "builtin" (func $two (param i32)))
      4    (import "" "builtin" (func $three (result i32)))
      5    (import "" "builtin" (func $four (param f32 f32 f32 f32 f32 f32 f32 f32 f32 f32 f32 f32) (result f32)))
      6    (func (export "run")
      7        (call $one)
      8        (call $two (i32.const 0))
      9        (drop (call $three))
     10        (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)))
     11    )
     12 )`);
     13 var m = new WebAssembly.Module(code);
     14 var i = new WebAssembly.Instance(m, {'':{builtin:Math.sin}});
     15 i.exports.run();