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

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/jit-test/tests/jaeger/recompile/callic.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,27 @@
     1.4 +
     1.5 +/* Recompilation while being processed by a call IC. */
     1.6 +
     1.7 +var g;
     1.8 +function foo() {
     1.9 +  for (g = 0; g < 5; g++) {
    1.10 +    bar();
    1.11 +  }
    1.12 +  function bar() {
    1.13 +    with ({}) {
    1.14 +      eval("g = undefined;");
    1.15 +    }
    1.16 +  }
    1.17 +}
    1.18 +foo();
    1.19 +
    1.20 +assertEq(g, NaN);
    1.21 +
    1.22 +/* Recompilation while being processed by a native call IC. */
    1.23 +
    1.24 +function native() {
    1.25 +  var x;
    1.26 +  x = x;
    1.27 +  x = Math.ceil(NaN);
    1.28 +  assertEq(x, NaN);
    1.29 +}
    1.30 +native();

mercurial