Debian Codegraph @

js/src/jit-test/tests/auto-regress/bug1875487.js

raw
1 function f(i) {
2 // Add use of the boxed Int32 parameter |i| as a Double.
3 (2 ** i);
4
5 // This call into |g| will get inlined and an inline-arguments object will be
6 // created. |i| was unboxed to Double earlier, but we must not store the
7 // unboxed Double into the inline-arguments object, because other uses of the
8 // boxed Int32 |i| may expect Int32 inputs.
9 return g(i);
10 }
11
12 function g(i) {
13 // Add use of aliased |i| as an Int32.
14 if (i) {
15 // Add use |arguments| to make |i| an aliased variable which gets stored in
16 // the inline-arguments object.
17 return arguments;
18 }
19 }
20
21 // Don't inline |f| into the top-level script.
22 with ({});
23
24 for (let i = 0; i < 4000; i++) {
25 f(i);
26 }