comparison: js/src/jit-test/tests/closures/name-both-hvy.js
js/src/jit-test/tests/closures/name-both-hvy.js
- branch
- TOR_BUG_3246
- changeset 6
- 8bccb770b82d
equal
deleted
inserted
replaced
|
1 actual = ''; |
|
2 expected = ''; |
|
3 |
|
4 // do not crash |
|
5 |
|
6 function q() { |
|
7 } |
|
8 |
|
9 function f() { |
|
10 var j = 12; |
|
11 |
|
12 function g() { |
|
13 eval(""); // makes |g| heavyweight |
|
14 for (var i = 0; i < 3; ++i) { |
|
15 j; |
|
16 } |
|
17 } |
|
18 |
|
19 j = 13; |
|
20 q(g); // escaping |g| makes |f| heavyweight |
|
21 g(); |
|
22 j = 14; |
|
23 } |
|
24 |
|
25 f(); |
|
26 |
|
27 |
|
28 assertEq(actual, expected) |