michael@0: actual = ''; michael@0: expected = ''; michael@0: michael@0: // do not crash michael@0: michael@0: function q() { michael@0: } michael@0: michael@0: function f() { michael@0: var j = 12; michael@0: michael@0: function g() { michael@0: eval(""); // makes |g| heavyweight michael@0: for (var i = 0; i < 3; ++i) { michael@0: j; michael@0: } michael@0: } michael@0: michael@0: j = 13; michael@0: q(g); // escaping |g| makes |f| heavyweight michael@0: g(); michael@0: j = 14; michael@0: } michael@0: michael@0: f(); michael@0: michael@0: michael@0: assertEq(actual, expected)