summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/jaeger/inline/scripted-01.js
blob: f6a585d0547cfb400866b8a033259dc7529462bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
function bar(x, y) {
  return x + y;
}

function foo(x, y) {
  var a = 0;
  for (var i = 0; i < 1000; i++) {
    a += bar(x, y);
    a += bar(x, y);
    a += bar(x, y);
    a += bar(x, y);
  }
  return a;
}

var q = foo(0, 1);
assertEq(q, 4000);