summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/warp/bug1852398.js
blob: 6e12d2a31de9d84085b8884ce216471445ecd7fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// |jit-test| --no-threads

function inner(obj, f) {
  return obj.x + f();
}

function middle(obj, f) {
  return inner(obj, f);
}

function outer(obj, f) {
  return middle(obj, f);
}

var fs = [() => 1, () => 2];

with ({}) {}
for (var i = 0; i < 1500; i++) {
  var obj = {x: 1};
  obj["y" + i % 2] = 2;
  outer(obj, fs[i % 2]);
}
for (var i = 0; i < 1500; i++) {
  var obj = {x: 1};
  obj["y" + (3 + (i % 10))] = 2;
  outer(obj, fs[i % 2]);
}