summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/setArgumentsLength.js
blob: 775d3ef9f2cf563ce9e7c517b7620a341397454f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
var count = 0;

function f() {
  arguments.length--;
  for (var i = 0; i < arguments.length; ++i) {
    ++count;
  }
}

f(1, 2);
f(1, 2);
f(2, 2);

assertEq(count, 3);