summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/jaeger/recompile/flush.js
blob: 81681e6040408a09da114f0313d330ef43f27196 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* Handle flushing of scripted call ICs pointing to recompiled functions. */

function add(x, y) {
  var z = x + y;
  return String(x + y);
}

function foo() {
  var x = 0x7ffffff0;
  var res = "";
  for (var i = 0; i < 20; i++) {
    res += add(x, i) + ",";
    res += add(x, i) + ",";
  }
  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,");
}
foo();