summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/arguments/args-createontrace.js
blob: 9f9f0a4082068dc67c0f5eca261632171912a707 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
actual = '';
expected = '5,4,3,2,1,X,5,4,3,2,1,Y,5,4,3,2,1,';

function f() {
  for (var i = 0; i < 5; ++i) {
    var args = arguments;
    appendToActual(args[i]);
  }
}

f(5, 4, 3, 2, 1);
appendToActual("X");
f(5, 4, 3, 2, 1);
appendToActual("Y");
f(5, 4, 3, 2, 1);


assertEq(actual, expected)