js/src/jit-test/tests/basic/testFunApplyMadness400.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/testFunApplyMadness400.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,19 @@
     1.4 +function g() { assertEq(false, true) }
     1.5 +var max = 400; ct = 0;
     1.6 +
     1.7 +function f(b) {
     1.8 +    if (b) {
     1.9 +        f(b - 1);
    1.10 +    } else {
    1.11 +        g = {
    1.12 +            apply:function(x,y) {
    1.13 +                assertEq(x, null);
    1.14 +                assertEq(y[0], ct);
    1.15 +                ++ct;
    1.16 +            }
    1.17 +        };
    1.18 +    }
    1.19 +    g.apply(null, arguments);
    1.20 +}
    1.21 +f(max - 1);
    1.22 +assertEq(ct, max);

mercurial