summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/jaeger/recompile/callic.js
blob: 6647c9acf63f9a6d7fe15725fcd35b68a8189a52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* Recompilation while being processed by a call IC. */

var g;
function foo() {
  for (g = 0; g < 5; g++) {
    bar();
  }
  function bar() {
    with ({}) {
      eval("g = undefined;");
    }
  }
}
foo();

assertEq(g, NaN);

/* Recompilation while being processed by a native call IC. */

function native() {
  var x;
  x = x;
  x = Math.ceil(NaN);
  assertEq(x, NaN);
}
native();