Debian Codegraph @

js/src/jit-test/tests/ion/bug1902983.js

raw
1 // |jit-test| --fast-warmup; --gc-zeal=21,100; skip-if: !wasmIsSupported()
2 let counter = 0;
3 function g() {
4 counter++;
5 const y = BigInt.asIntN(counter, -883678545n);
6 const z = y >> y;
7 BigInt.asUintN(2 ** counter, 883678545n);
8 try { g(); } catch (e) { }
9 }
10 function f() {
11 for (let i = 0; i < 5; i++) {
12 for (let j = 0; j < 30; j++) { }
13 Promise.allSettled().catch(e => null);
14 counter = 0;
15 g();
16 }
17 }
18 const binary = wasmTextToBinary(`(module (import "m" "f" (func $f)) (func (export "test") (call $f)))`);
19 const mod = new WebAssembly.Module(binary);
20 const inst = new WebAssembly.Instance(mod, { m: { f: f } });
21 for (let i = 0; i < 100; i++) { }
22 for (let i = 0; i < 5; i++) {
23 inst.exports.test();
24 }