tor-browser

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

bug1900523.js (587B)


      1 // |jit-test| --fast-warmup; --no-threads; skip-if: !wasmIsSupported()
      2 function f1() {
      3  Promise.allSettled().catch(e => null);
      4  do {
      5    f2(10n, -1n);
      6    try {
      7      f2(-2147483648n);
      8    } catch {}
      9  } while (!inIon());
     10 }
     11 function f2(x, y) {
     12  const z = x >> x;
     13  z <= z ? z : z;
     14  y ^ y;
     15 }
     16 const binary = wasmTextToBinary(`
     17  (module
     18    (import "m" "f" (func $f))
     19    (func (export "test")
     20      (call $f)
     21    )
     22  )
     23 `);
     24 const mod = new WebAssembly.Module(binary);
     25 const inst = new WebAssembly.Instance(mod, {"m": {"f": f1}});
     26 for (let i = 0; i < 6; i++) {
     27  inst.exports.test();
     28 }