Debian Codegraph @

js/src/jit-test/tests/class/bug1720032-3.js

raw
1 function main() {
2 class Base {}
3
4 class Derived extends Base {
5 constructor() {
6 super();
7
8 let v = 0xffff;
9
10 try {
11 // Ensure this statement doesn't get DCE'ed.
12 v &= 0xff;
13
14 // Calling |super()| twice throws an error.
15 super();
16 } catch {}
17
18 assertEq(v, 255);
19 }
20 }
21
22 for (let i = 0; i < 15; i++) {
23 new Derived();
24 }
25 }
26 main();
27 main();