summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testBug634590c.js
blob: 1ae2542def1e29f4eec53a5dfe99fd7a7f41e8d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
this.name = "outer";
var sb = evalcx('');
sb.name = "inner";
sb.parent = this;
function f() { return this.name; }
f.notMuchTodo = '42';
assertEq(evalcx('(function () {\n' +
                '  arguments = null;\n' + // force heavyweight
                '  var f = parent.f;\n' +
                '  var name = "call";\n' +
                '  return (function () {\n' +
                '    eval(f.notMuchTodo);\n' + // reify Call, make f() compile to JSOP_CALLNAME
                '    var s = "";\n' +
                '    for (i = 0; i < 10; ++i)\n' +
                '      s += f();\n' +
                '    return s;\n' +
                '  })();\n' +
                '})()',
                sb),
	 "outerouterouterouterouterouterouterouterouterouter");