summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/cacheir/bug1852893-1.js
blob: 150c6252ae095a7bb1a2633f381c75983edf9dc4 (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| --fast-warmup; --no-threads; --blinterp-eager

function foo(o) {
  return foo_inner(o);
}

function foo_inner(o) {
  return o.x;
}
with ({}) {}

for (var i = 0; i < 13; i++) {
  foo({x:1, ["y" + (i % 5)]: 2});
}

for (var i = 0; i < 17; i++) {
  foo({x: 1, ["y" + (i % 8)]: 2});
}

eval("for (var i = 0; i < 10; i++) foo({y: 1, x:2})")

// Purge a stub inside a trial-inlined script.
gc();

for (var i = 0; i < 50; i++) {
  foo({x: 1, ["y" + (i % 3)]: 2});
}