summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/jaeger/closure-03.js
blob: e2d1ebe3f85c5336979ac9870087546f2eeab62f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* Recovering non-reentrant information on singletons after a GC. */

function foo(a) {
  return function() {
    gc();
    var n = 0;
    for (var i = 0; i < 20; i++)
      n = a++;
    assertEq(n, 29);
  };
}
var a = foo(10);
var b = foo(20);
a();