summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/test-apply-many-args.js
blob: ea02f4df3539b6e0b0b97aef2b0104d0e4339928 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
function f(x) {
    if (x == 0)
        return;
    arguments[0]--;
    f.apply(null, arguments);
}

// When the apply-optimization isn't on, each recursive call chews up the C
// stack, so don't push it.
a = [20];

for (var i = 0; i < 2000; ++i)
  a.push(i);
f.apply(null, a);