michael@0: this.name = "outer"; michael@0: var sb = evalcx(''); michael@0: sb.name = "inner"; michael@0: sb.parent = this; michael@0: function f() { return this.name; } michael@0: f.notMuchTodo = '42'; michael@0: assertEq(evalcx('(function () {\n' + michael@0: ' arguments = null;\n' + // force heavyweight michael@0: ' var f = parent.f;\n' + michael@0: ' var name = "call";\n' + michael@0: ' return (function () {\n' + michael@0: ' eval(f.notMuchTodo);\n' + // reify Call, make f() compile to JSOP_CALLNAME michael@0: ' var s = "";\n' + michael@0: ' for (i = 0; i < 10; ++i)\n' + michael@0: ' s += f();\n' + michael@0: ' return s;\n' + michael@0: ' })();\n' + michael@0: '})()', michael@0: sb), michael@0: "outerouterouterouterouterouterouterouterouterouter");