summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/bug1132128.js
blob: b0d8dd1fdd3e63dc8f158d333e4d8e35466b224c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
if (getJitCompilerOptions()["ion.warmup.trigger"] > 20)
    setJitCompilerOption("ion.warmup.trigger", 20);
function callRegExpTest(i) {
    var s = "" + i;
    var re = /(\d+)/;
    re.test(s);
    assertEq(RegExp.$1, s);
}
function callRegExpExec(i) {
    var s = "" + i;
    var re = /(\d+)/;
    var res = re.exec(s);
    assertEq(RegExp.$1, s);
    return res;
}
function callRegExpReplace(i) {
    var s = "" + i;
    var re = /(\d+)/;
    s.replace(re, "");
    assertEq(RegExp.$1, s);
}
for (var i = 0; i < 60; i++) {
    callRegExpTest(i);
    callRegExpExec(i);
    callRegExpReplace(i);
}