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

// args object created by interpreter

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

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


assertEq(actual, expected)