trial-inline-gc-3.js (528B)
1 // |jit-test| --fast-warmup 2 function h(i) { 3 if (i === 150) { 4 with(this) {} // Don't inline. 5 // Trigger an invalidation of f's IonScript (with g inlined into it) on 6 // the stack. Before we bail out, replace g and trial-inline the new 7 // function. The bailout must not get confused by this. 8 gc(this, "shrinking"); 9 g = (i, x) => x + 20; 10 f(); 11 } 12 } 13 function g(i, x) { 14 h(i); 15 return x + 1; 16 } 17 function f() { 18 for (var i = 0; i < 300; i++) { 19 g(i, "foo"); 20 g(i, 1); 21 } 22 } 23 f();