js/src/jit-test/tests/basic/test-apply-many-args.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/jit-test/tests/basic/test-apply-many-args.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,14 @@
     1.4 +function f(x) {
     1.5 +    if (x == 0)
     1.6 +        return;
     1.7 +    arguments[0]--;
     1.8 +    f.apply(null, arguments);
     1.9 +}
    1.10 +
    1.11 +// When the apply-optimization isn't on, each recursive call chews up the C
    1.12 +// stack, so don't push it.
    1.13 +a = [20];
    1.14 +
    1.15 +for (var i = 0; i < 2000; ++i)
    1.16 +  a.push(i);
    1.17 +f.apply(null, a);

mercurial