summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/iterator-indices-4.js
blob: f71d5014f81f8657ed9ed5678aae0c86dc75c4d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
function id(x) { return x; }

function foo(obj) {
  for (var key in obj) {
    assertEq(id(obj[key]), obj[key]);
  }
}

var arr = [];
for (var i = 0; i < 8; i++) {
  var obj = {["x" + i]: 1};
  arr.push(obj);
}

with ({}) {}
for (var i = 0; i < 1000; i++) {
  let obj = arr[i % arr.length];
  foo(obj);
}