summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/arguments/apply-args-obj-03.js
blob: 03fe82f68361ce44fd2196ea78979b08936ede02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
function escape() { with ({}) {} }

function foo(i) {
    return i;
}

function bar(n) {
    escape(arguments);
    return foo.apply({}, arguments);
}

function baz(a, n) {
    return bar(n);
}

var sum = 0;
for (var i = 0; i < 10000; i++) {
    sum += baz(0, 1);
}
assertEq(sum, 10000);