Debian Codegraph @

js/src/jit-test/tests/warp/scalar-replace-array-apply-array-04.js

raw
1 var result;
2
3 function g(a, b) {
4 with ({}) {}
5 result = a + b;
6 }
7
8 function escape() { with({}) {} }
9
10 function f(...args) {
11 escape(args);
12 for (var i = 0; i < 50; ++i) {
13 g.apply(this, args);
14 }
15 }
16
17 // |f| must be small enough to be inlinable.
18 assertEq(isSmallFunction(f), true);
19
20 f(1, 2);
21 assertEq(result, 3);
22
23 f("");
24 assertEq(result, "undefined");