michael@0: // Eval-in-frame with different type on baseline frame with let-scoping michael@0: michael@0: load(libdir + "jitopts.js"); michael@0: michael@0: if (!jitTogglesMatch(Opts_BaselineEager)) michael@0: quit(0); michael@0: michael@0: withJitOptions(Opts_BaselineEager, function () { michael@0: var g = newGlobal(); michael@0: var dbg = new Debugger; michael@0: michael@0: g.h = function h(d) { michael@0: if (d) { michael@0: dbg.addDebuggee(g); michael@0: var f = dbg.getNewestFrame().older; michael@0: assertEq(f.implementation, "baseline"); michael@0: assertEq(f.environment.getVariable("foo"), 42); michael@0: f.eval("foo = 'string of 42'"); michael@0: } michael@0: } michael@0: michael@0: g.eval("" + function f(d) { michael@0: if (d) { michael@0: let foo = 42; michael@0: g(d); michael@0: return foo; michael@0: } michael@0: }); michael@0: michael@0: g.eval("" + function g(d) { h(d); }); michael@0: michael@0: g.eval("(" + function () { assertEq(f(true), "string of 42"); } + ")();"); michael@0: });