Debian Codegraph @

js/src/jit-test/tests/bigint/bigint-mod-by-zero-not-bigintptr.js

raw
1 // Fallible BigInt modulus should have a resume point and its alias set
2 // should record that exceptions can be thrown.
3 function resumeAfterException(t) {
4 for (var i = 0; i < 2; i++) {
5 try {
6 var x = 1;
7 1_0000_0000_0000_0000n % 1n;
8 x = 2;
9 1_0000_0000_0000_0000n % t;
10 } catch (e) {
11 assertEq(x, 2);
12 }
13 }
14 }
15 resumeAfterException(1n);
16 resumeAfterException(0n);