js/src/jit-test/tests/ion/bug754720.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 f2(a) {
michael@0 2 return f2.arguments;
michael@0 3 }
michael@0 4
michael@0 5 // The first eager-compiled call will bailout, do not assert.
michael@0 6 f2();
michael@0 7
michael@0 8 var o;
michael@0 9 o = f2();
michael@0 10 assertEq(o.length, 0);
michael@0 11
michael@0 12 o = f2(21);
michael@0 13 assertEq(o.length, 1);
michael@0 14 assertEq(o[0], 21);
michael@0 15
michael@0 16 o = f2(21,42);
michael@0 17 assertEq(o.length, 2);
michael@0 18 assertEq(o[0], 21);
michael@0 19 assertEq(o[1], 42);
michael@0 20
michael@0 21 // 100 arguments.
michael@0 22 o = f2(0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,
michael@0 23 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,
michael@0 24 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,
michael@0 25 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,
michael@0 26 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9);
michael@0 27 for (var i in o)
michael@0 28 assertEq(o[i], i % 10);
michael@0 29
michael@0 30 // 200 arguments.
michael@0 31 o = f2(0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,
michael@0 32 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,
michael@0 33 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,
michael@0 34 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,
michael@0 35 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,
michael@0 36
michael@0 37 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,
michael@0 38 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,
michael@0 39 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,
michael@0 40 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,
michael@0 41 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9);
michael@0 42 for (var i in o)
michael@0 43 assertEq(o[i], i % 10);
michael@0 44
michael@0 45 // 300 arguments.
michael@0 46 o = f2(0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,
michael@0 47 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,
michael@0 48 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,
michael@0 49 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,
michael@0 50 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,
michael@0 51
michael@0 52 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,
michael@0 53 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,
michael@0 54 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,
michael@0 55 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,
michael@0 56 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,
michael@0 57
michael@0 58 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,
michael@0 59 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,
michael@0 60 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,
michael@0 61 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,
michael@0 62 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9);
michael@0 63 for (var i in o)
michael@0 64 assertEq(o[i], i % 10);

mercurial