js/src/jit-test/tests/jaeger/recompile/flush.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/flush.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,18 @@
     1.4 +
     1.5 +/* Handle flushing of scripted call ICs pointing to recompiled functions. */
     1.6 +
     1.7 +function add(x, y) {
     1.8 +  var z = x + y;
     1.9 +  return String(x + y);
    1.10 +}
    1.11 +
    1.12 +function foo() {
    1.13 +  var x = 0x7ffffff0;
    1.14 +  var res = "";
    1.15 +  for (var i = 0; i < 20; i++) {
    1.16 +    res += add(x, i) + ",";
    1.17 +    res += add(x, i) + ",";
    1.18 +  }
    1.19 +  assertEq(res, "2147483632,2147483632,2147483633,2147483633,2147483634,2147483634,2147483635,2147483635,2147483636,2147483636,2147483637,2147483637,2147483638,2147483638,2147483639,2147483639,2147483640,2147483640,2147483641,2147483641,2147483642,2147483642,2147483643,2147483643,2147483644,2147483644,2147483645,2147483645,2147483646,2147483646,2147483647,2147483647,2147483648,2147483648,2147483649,2147483649,2147483650,2147483650,2147483651,2147483651,");
    1.20 +}
    1.21 +foo();

mercurial