michael@0: // Test that lazy inner functions inside eval are tagged properly so we don't michael@0: // incorrectly do NAME -> GNAME optimization. michael@0: michael@0: var g = newGlobal(); michael@0: var dbg = new Debugger(g); michael@0: dbg.onNewScript = function delazify(script, global) { michael@0: // Force delazification of inner functions. michael@0: script.getChildScripts(); michael@0: }; michael@0: michael@0: g.eval("" + function f() { michael@0: var $; michael@0: eval('var obj={foo:1}; $=function() { assertEq(obj.foo, 1); }'); michael@0: return $; michael@0: }); michael@0: g.eval("f()();");