michael@0: // Eval-in-frame of optimized frames to break out of an infinite loop. michael@0: michael@0: load(libdir + "jitopts.js"); michael@0: michael@0: if (!jitTogglesMatch(Opts_IonEagerNoParallelCompilation)) michael@0: quit(0); michael@0: michael@0: withJitOptions(Opts_IonEagerNoParallelCompilation, function () { michael@0: var g = newGlobal(); michael@0: var dbg = new Debugger; michael@0: michael@0: g.eval("" + function f(d) { g(d); }); michael@0: g.eval("" + function g(d) { h(d); }); michael@0: g.eval("" + function h(d) { michael@0: var i = 0; michael@0: while (d) michael@0: interruptIf(d && i++ == 4000); michael@0: }); michael@0: michael@0: setInterruptCallback(function () { michael@0: dbg.addDebuggee(g); michael@0: var frame = dbg.getNewestFrame(); michael@0: if (frame.callee.name != "h" || frame.implementation != "ion") michael@0: return true; michael@0: frame.eval("d = false;"); michael@0: return true; michael@0: }); michael@0: michael@0: g.eval("(" + function () { michael@0: for (i = 0; i < 5; i++) michael@0: f(false); michael@0: f(true); michael@0: } + ")();"); michael@0: });