summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/warp/inline-array-at.js
blob: 4abc06ebd5bdac4b7ca1b6cf2c189f5b3db4bab9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function f(x) {
  assertEq(x.at(0), 1);
  assertEq(x.at(-1), 3);
  assertEq(x.at(10), undefined);
}

function g() {
  for (var i = 0; i < 100; i++) {
    f([1, 2, 3]);
  }
}

for (var j = 0; j < 10; j++) {
  g();
}