summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/warp/bug1667685.js
blob: 99699b88d55f27694579179b1af32f54d3b75f4f (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
27
// |jit-test| --fast-warmup

// Prevent slowness with --ion-eager.
setJitCompilerOption("ion.warmup.trigger", 100);

function h() {
    return 1;
}
function g() {
    for (var j = 0; j < 10; j++) {
        h();
    }
    trialInline();
}
function f() {
    for (var i = 0; i < 2; i++) {
        var fun = Function(g.toString() + "g()");
        try {
            fun();
        } catch {}
        try {
            fun();
        } catch {}
    }

}
oomTest(f);