js/src/jit-test/tests/ion/bug824473.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 function dumpArgs(i) { if (i == 90) return funapply.arguments.length; return [i]; }
     2 function funapply() { return dumpArgs.apply({}, arguments); }
     3 function test(i) { return funapply(i); }
     5 assertEq(test(89)[0], 89);
     6 assertEq(test(90), 1);
     8 function dumpArgs2(i,b) { if (i == 90) return funapply2.arguments.length; return [i]; }
     9 function funapply2() { return dumpArgs2.apply({}, arguments); }
    10 function test2(i,b) { return funapply2(i,b); }
    12 assertEq(test2(89, 10)[0], 89);
    13 assertEq(test2(90, 10), 2);
    15 function dumpArgs3(i,b) { if (i == 90) return funapply3.arguments.length; return [i]; }
    16 function funapply3() { return dumpArgs3.apply({}, arguments); }
    17 function test3(i,b, c) { return funapply3(i,b,c); }
    19 assertEq(test3(89, 10, 11)[0], 89);
    20 assertEq(test3(90, 10, 11), 3);
    22 function dumpArgs4(i) { if (i == 90) return funapply4.arguments.length; return [i]; }
    23 function funapply4() { return dumpArgs4.apply({}, arguments); }
    24 function test4(i,b) { return funapply4(i,b,1,2); }
    26 assertEq(test4(89,10)[0], 89);
    27 assertEq(test4(90,10), 4);
    29 function dumpArgs5(i,j,k,l) { if (i == 90) return funapply5.arguments.length*10 + l; return [i]; }
    30 function funapply5() { return dumpArgs5.apply({}, arguments); }
    31 function test5(i,b) { return funapply5(i,b,1,2); }
    33 assertEq(test5(89,10)[0], 89);
    34 assertEq(test5(90,10), 42);
    36 function dumpArgs6(i) { if (i == 90) return funapply6.arguments.length; return [i]; }
    37 function funapply6() { return dumpArgs6.apply({}, arguments); }
    38 function test6(i) { return funapply6(i,1,2,3); }
    40 assertEq(test6(89)[0], 89);
    41 assertEq(test6(90), 4);

mercurial