michael@0: load(libdir + 'bytecode-cache.js'); michael@0: var test = ""; michael@0: michael@0: // code a function which has both used and unused inner functions. michael@0: test = (function () { michael@0: function f() { michael@0: var x = 3; michael@0: (function() { michael@0: with(obj) { michael@0: (function() { michael@0: assertEq(x, 2); michael@0: })(); michael@0: } michael@0: })(); michael@0: }; michael@0: michael@0: return "var obj = { x : 2 };" + f.toSource() + "; f()"; michael@0: })(); michael@0: evalWithCache(test, { assertEqBytecode: true, assertEqResult : true });