Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 // Eval-in-frame with different type on baseline frame with let-scoping
3 load(libdir + "jitopts.js");
5 if (!jitTogglesMatch(Opts_BaselineEager))
6 quit(0);
8 withJitOptions(Opts_BaselineEager, function () {
9 var g = newGlobal();
10 var dbg = new Debugger;
12 g.h = function h(d) {
13 if (d) {
14 dbg.addDebuggee(g);
15 var f = dbg.getNewestFrame().older;
16 assertEq(f.implementation, "baseline");
17 assertEq(f.environment.getVariable("foo"), 42);
18 f.eval("foo = 'string of 42'");
19 }
20 }
22 g.eval("" + function f(d) {
23 if (d) {
24 let foo = 42;
25 g(d);
26 return foo;
27 }
28 });
30 g.eval("" + function g(d) { h(d); });
32 g.eval("(" + function () { assertEq(f(true), "string of 42"); } + ")();");
33 });