PageRenderTime 6ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 2ms app.codeStats 0ms

/js/src/jit-test/tests/jaeger/recompile/callic.js

http://github.com/zpao/v8monkey
JavaScript | 27 lines | 20 code | 5 blank | 2 comment | 1 complexity | 77b9c2e7d7164a9faa1c43fe67ff8dfd MD5 | raw file
 1
 2/* Recompilation while being processed by a call IC. */
 3
 4var g;
 5function foo() {
 6  for (g = 0; g < 5; g++) {
 7    bar();
 8  }
 9  function bar() {
10    with ({}) {
11      eval("g = undefined;");
12    }
13  }
14}
15foo();
16
17assertEq(g, NaN);
18
19/* Recompilation while being processed by a native call IC. */
20
21function native() {
22  var x;
23  x = x;
24  x = Math.ceil(NaN);
25  assertEq(x, NaN);
26}
27native();