summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/closures/set-outer-trace-3.js
blob: 458968fb3809410d6dc135e73d2837aea9226be7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
actual = '';
expected = '10.5,19.5,128.5,337.5,646.5,1055.5,1564.5,2173.5,2882.5,3691.5,4600.5,';

function f() {
  var x = 10.5;
  
  var g = function(p) {
    for (var i = 0; i < 10; ++i)
      x = p + i;
  }
  
  for (var i = 0; i < 10; ++i) {
    appendToActual(x);
    g(100 * i + x);
  }

  appendToActual(x);
}

f();


assertEq(actual, expected)