bug2001279.js (640B)
1 // |jit-test| --no-threads 2 with ({}) {} 3 4 5 function foo() { 6 target(); 7 } 8 9 // A function that can be inlined 10 function good() {} 11 12 // A function that can't be inlined (because of the asm.js lambda) 13 function bad() { 14 if (!bad) { 15 function inner() { 16 "use asm"; 17 function f() {} 18 return f; 19 } 20 } 21 } 22 23 // Compile a version of foo that calls good without inlining it. 24 for (var i = 0; i < 1000; i++) { 25 try { foo(); } catch {} 26 } 27 target = good; 28 for (var i = 0; i < 500; i++) { 29 foo(); 30 } 31 32 // Bail out of the ion-compiled version of foo. 33 // Attach an IC that calls bad. 34 target = bad; 35 for (var i = 0; i < 1500; i++) { 36 foo(); 37 }