js/src/jit-test/tests/basic/test_JSOP_ARGSUB.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.

michael@0 1 function test_JSOP_ARGSUB() {
michael@0 2 function f0() { return arguments[0]; }
michael@0 3 function f1() { return arguments[1]; }
michael@0 4 function f2() { return arguments[2]; }
michael@0 5 function f3() { return arguments[3]; }
michael@0 6 function f4() { return arguments[4]; }
michael@0 7 function f5() { return arguments[5]; }
michael@0 8 function f6() { return arguments[6]; }
michael@0 9 function f7() { return arguments[7]; }
michael@0 10 function f8() { return arguments[8]; }
michael@0 11 function f9() { return arguments[9]; }
michael@0 12 var a = [];
michael@0 13 for (var i = 0; i < 10; i++) {
michael@0 14 a[0] = f0('a');
michael@0 15 a[1] = f1('a','b');
michael@0 16 a[2] = f2('a','b','c');
michael@0 17 a[3] = f3('a','b','c','d');
michael@0 18 a[4] = f4('a','b','c','d','e');
michael@0 19 a[5] = f5('a','b','c','d','e','f');
michael@0 20 a[6] = f6('a','b','c','d','e','f','g');
michael@0 21 a[7] = f7('a','b','c','d','e','f','g','h');
michael@0 22 a[8] = f8('a','b','c','d','e','f','g','h','i');
michael@0 23 a[9] = f9('a','b','c','d','e','f','g','h','i','j');
michael@0 24 }
michael@0 25 return a.join("");
michael@0 26 }
michael@0 27 assertEq(test_JSOP_ARGSUB(), "abcdefghij");

mercurial