summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/arguments/argsx-2.js
blob: 5fe9af97d8e81e65450f7f4967c5ecd6be640e35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
actual = '';
expected = "function f() {\n  var a = arguments;\n  \n  appendToActual(a.callee);\n  appendToActual(a.length);\n  appendToActual(a[0]);\n  appendToActual(a[1]);\n},3,1,2,function f() {\n  var a = arguments;\n  \n  appendToActual(a.callee);\n  appendToActual(a.length);\n  appendToActual(a[0]);\n  appendToActual(a[1]);\n},3,1,2,function f() {\n  var a = arguments;\n  \n  appendToActual(a.callee);\n  appendToActual(a.length);\n  appendToActual(a[0]);\n  appendToActual(a[1]);\n},3,1,2,function f() {\n  var a = arguments;\n  \n  appendToActual(a.callee);\n  appendToActual(a.length);\n  appendToActual(a[0]);\n  appendToActual(a[1]);\n},3,1,2,function f() {\n  var a = arguments;\n  \n  appendToActual(a.callee);\n  appendToActual(a.length);\n  appendToActual(a[0]);\n  appendToActual(a[1]);\n},3,1,2,function f() {\n  var a = arguments;\n  \n  appendToActual(a.callee);\n  appendToActual(a.length);\n  appendToActual(a[0]);\n  appendToActual(a[1]);\n},3,1,2,function f() {\n  var a = arguments;\n  \n  appendToActual(a.callee);\n  appendToActual(a.length);\n  appendToActual(a[0]);\n  appendToActual(a[1]);\n},3,1,2,function f() {\n  var a = arguments;\n  \n  appendToActual(a.callee);\n  appendToActual(a.length);\n  appendToActual(a[0]);\n  appendToActual(a[1]);\n},3,1,2,function f() {\n  var a = arguments;\n  \n  appendToActual(a.callee);\n  appendToActual(a.length);\n  appendToActual(a[0]);\n  appendToActual(a[1]);\n},3,1,2,function f() {\n  var a = arguments;\n  \n  appendToActual(a.callee);\n  appendToActual(a.length);\n  appendToActual(a[0]);\n  appendToActual(a[1]);\n},3,1,2,function f() {\n  var a = arguments;\n  \n  appendToActual(a.callee);\n  appendToActual(a.length);\n  appendToActual(a[0]);\n  appendToActual(a[1]);\n},2,[object Object],a,function f() {\n  var a = arguments;\n  \n  appendToActual(a.callee);\n  appendToActual(a.length);\n  appendToActual(a[0]);\n  appendToActual(a[1]);\n},2,[object Object],a,function f() {\n  var a = arguments;\n  \n  appendToActual(a.callee);\n  appendToActual(a.length);\n  appendToActual(a[0]);\n  appendToActual(a[1]);\n},2,[object Object],a,function f() {\n  var a = arguments;\n  \n  appendToActual(a.callee);\n  appendToActual(a.length);\n  appendToActual(a[0]);\n  appendToActual(a[1]);\n},2,[object Object],a,function f() {\n  var a = arguments;\n  \n  appendToActual(a.callee);\n  appendToActual(a.length);\n  appendToActual(a[0]);\n  appendToActual(a[1]);\n},2,[object Object],a,function f() {\n  var a = arguments;\n  \n  appendToActual(a.callee);\n  appendToActual(a.length);\n  appendToActual(a[0]);\n  appendToActual(a[1]);\n},2,[object Object],a,function f() {\n  var a = arguments;\n  \n  appendToActual(a.callee);\n  appendToActual(a.length);\n  appendToActual(a[0]);\n  appendToActual(a[1]);\n},2,[object Object],a,function f() {\n  var a = arguments;\n  \n  appendToActual(a.callee);\n  appendToActual(a.length);\n  appendToActual(a[0]);\n  appendToActual(a[1]);\n},2,[object Object],a,function f() {\n  var a = arguments;\n  \n  appendToActual(a.callee);\n  appendToActual(a.length);\n  appendToActual(a[0]);\n  appendToActual(a[1]);\n},2,[object Object],a,function f() {\n  var a = arguments;\n  \n  appendToActual(a.callee);\n  appendToActual(a.length);\n  appendToActual(a[0]);\n  appendToActual(a[1]);\n},2,[object Object],a,function f() {\n  var a = arguments;\n  \n  appendToActual(a.callee);\n  appendToActual(a.length);\n  appendToActual(a[0]);\n  appendToActual(a[1]);\n},2,abc,def,function f() {\n  var a = arguments;\n  \n  appendToActual(a.callee);\n  appendToActual(a.length);\n  appendToActual(a[0]);\n  appendToActual(a[1]);\n},2,abc,def,function f() {\n  var a = arguments;\n  \n  appendToActual(a.callee);\n  appendToActual(a.length);\n  appendToActual(a[0]);\n  appendToActual(a[1]);\n},2,abc,def,function f() {\n  var a = arguments;\n  \n  appendToActual(a.callee);\n  appendToActual(a.length);\n  appendToActual(a[0]);\n  appendToActual(a[1]);\n},2,abc,def,function f() {\n  var a = arguments;\n  \n  appendToActual(a.callee);\n  appendToActual(a.length);\n  appendToActual(a[0]);\n  appendToActual(a[1]);\n},2,abc,def,function f() {\n  var a = arguments;\n  \n  appendToActual(a.callee);\n  appendToActual(a.length);\n  appendToActual(a[0]);\n  appendToActual(a[1]);\n},2,abc,def,function f() {\n  var a = arguments;\n  \n  appendToActual(a.callee);\n  appendToActual(a.length);\n  appendToActual(a[0]);\n  appendToActual(a[1]);\n},2,abc,def,function f() {\n  var a = arguments;\n  \n  appendToActual(a.callee);\n  appendToActual(a.length);\n  appendToActual(a[0]);\n  appendToActual(a[1]);\n},2,abc,def,function f() {\n  var a = arguments;\n  \n  appendToActual(a.callee);\n  appendToActual(a.length);\n  appendToActual(a[0]);\n  appendToActual(a[1]);\n},2,abc,def,function f() {\n  var a = arguments;\n  \n  appendToActual(a.callee);\n  appendToActual(a.length);\n  appendToActual(a[0]);\n  appendToActual(a[1]);\n},2,abc,def,"

// args object created on trace

function f() {
  var a = arguments;
  
  appendToActual(a.callee);
  appendToActual(a.length);
  appendToActual(a[0]);
  appendToActual(a[1]);
}

for (var i = 0; i < 10; ++i)
  f(1, 2, 3);
for (var i = 0; i < 10; ++i)
  f({}, 'a');
for (var i = 0; i < 10; ++i)
  f('abc', 'def');


assertEq(actual, expected)