js/src/jit-test/tests/basic/test_JSOP_ARGSUB.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_JSOP_ARGSUB.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,27 @@
     1.4 +function test_JSOP_ARGSUB() {
     1.5 +    function f0() { return arguments[0]; }
     1.6 +    function f1() { return arguments[1]; }
     1.7 +    function f2() { return arguments[2]; }
     1.8 +    function f3() { return arguments[3]; }
     1.9 +    function f4() { return arguments[4]; }
    1.10 +    function f5() { return arguments[5]; }
    1.11 +    function f6() { return arguments[6]; }
    1.12 +    function f7() { return arguments[7]; }
    1.13 +    function f8() { return arguments[8]; }
    1.14 +    function f9() { return arguments[9]; }
    1.15 +    var a = [];
    1.16 +    for (var i = 0; i < 10; i++) {
    1.17 +        a[0] = f0('a');
    1.18 +        a[1] = f1('a','b');
    1.19 +        a[2] = f2('a','b','c');
    1.20 +        a[3] = f3('a','b','c','d');
    1.21 +        a[4] = f4('a','b','c','d','e');
    1.22 +        a[5] = f5('a','b','c','d','e','f');
    1.23 +        a[6] = f6('a','b','c','d','e','f','g');
    1.24 +        a[7] = f7('a','b','c','d','e','f','g','h');
    1.25 +        a[8] = f8('a','b','c','d','e','f','g','h','i');
    1.26 +        a[9] = f9('a','b','c','d','e','f','g','h','i','j');
    1.27 +    }
    1.28 +    return a.join("");
    1.29 +}
    1.30 +assertEq(test_JSOP_ARGSUB(), "abcdefghij");

mercurial