recover-empty-new-object.js (1118B)
1 // |jit-test| --no-ion 2 // Warp lacks Scalar Replacement support (bug 1650233). Re-evaluate after that 3 // bug has been fixed. 4 5 // Ion eager fails the test below because we have not yet created any 6 // template object in baseline before running the content of the top-level 7 // function. 8 if (getJitCompilerOptions()["ion.warmup.trigger"] <= 20) 9 setJitCompilerOption("ion.warmup.trigger", 20); 10 11 // Prevent the GC from cancelling Ion compilations, when we expect them to succeed 12 gczeal(0); 13 14 // These arguments have to be computed by baseline, and thus captured in a 15 // resume point. The next function checks that we can remove the computation of 16 // these arguments. 17 function f(a, b, c, d) { } 18 19 function topLevel() { 20 for (var i = 0; i < 30; i++) { 21 var unused = {}; 22 var a = {}; 23 var b = {}; 24 var c = {}; 25 var d = {}; 26 assertRecoveredOnBailout(unused, true); 27 assertRecoveredOnBailout(a, true); 28 assertRecoveredOnBailout(b, true); 29 assertRecoveredOnBailout(c, true); 30 assertRecoveredOnBailout(d, true); 31 f(a, b, c, d); 32 } 33 } 34 35 topLevel();