summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/cacheir/generic-spreadcall.js
blob: bf1b053a539112b4353e871f22ae2a35eb489faf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
var sum = 0;

function foo() { sum++; }

const MAX_JIT_ARGS = 4096 / 8;
var arr = [];
for (var i = 0; i < MAX_JIT_ARGS + 1; i++) {
    arr.push(1);
}

for (var i = 0; i < 275; i++) {
    foo(...arr);
}
assertEq(sum, 275);