blinterp-trial-inlining.js (692B)
1 // |jit-test| --inlining-entry-threshold=1; --trial-inlining-warmup-threshold=50; --baseline-warmup-threshold=200; --ion-warmup-threshold=1000 2 3 let options = getJitCompilerOptions(); 4 if (!options['blinterp.enable'] || 5 !options['baseline.enable'] || 6 options['ion.warmup.trigger'] <= 100) { 7 print("Unsupported jit options"); 8 quit(); 9 } 10 11 function foo(o) { 12 return o.x; 13 } 14 15 function bar(o) { 16 return foo(o); 17 } 18 19 function test() { 20 with ({}) {} 21 for (var i = 0; i < 50; i++) { 22 bar({x: 1}) 23 bar({a: 0, x: 1}) 24 } 25 let ICs = disblic(bar); 26 if (/; IR:/.test(ICs)) { // Only assert if we can actually dump IR. 27 assertEq(/CallInlinedFunction/.test(ICs), true); 28 } 29 } 30 test();