summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/warp/bug1667699.js
blob: a88115c7c50657d328ae632a121022c4e0084592 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// |jit-test| --fast-warmup
function f(s) {
  // Trial-inline self-hosted |replace| and relazify.
  for (var i = 0; i < 50; i++) {
    s = s.replace("a", "b");
  }
  trialInline();
  relazifyFunctions();

  // Warp-compile.
  for (var j = 0; j < 50; j++) {}

  return s;
}
assertEq(f("a"), "b");