summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/closures/t037.js
blob: 0350c514031a62dacb921d6e770ba84a38852fdd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
actual = '';
expected = '7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,';

function heavy(s, t, u) {return eval(s)}

for (var i = 0; i < 5; ++i) {
  var flat = heavy("(function () {var x = t * t; return function(){return x + u}})()", 2, 3);
  for (var j = 0; j < 5; ++j) {
    appendToActual(flat());
  }
 }


assertEq(actual, expected)