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

// args object created by interpreter at record time, but not always at run time.

function f(t) {
  if (t) {
    var b = arguments;
    appendToActual(b[0]);
  }
  
  for (var i = 0; i < 10; ++i) {
    var a = arguments;
    appendToActual(a.callee);
    appendToActual(a.length);
    appendToActual(a[0]);
    appendToActual(a[1]);
  }
}

f(true, 1, 2, 3);
f(false, 1, 2, 3);
f(false, {}, 'a');
f(false, 'abc', 'def');


assertEq(actual, expected)