summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/arguments/argsx-3a.js
blob: fd278c039bc89356a25e42e1c521fafbe3e39ca7 (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 = "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,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,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},3,true,[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,true,[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,true,[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,true,[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,true,[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,true,[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,true,[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,true,[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,true,[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,true,[object Object],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},3,true,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,true,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,true,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,true,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,true,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,true,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,true,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,true,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,true,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,true,abc,"

// args object not created by interpreter at record time, but maybe 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(false, 1, 2, 3);
f(true, 1, 2, 3);
f(true, {}, 'a');
f(true, 'abc', 'def');


assertEq(actual, expected)