summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/self-test/inIon.js
blob: 40d1c03afc838a40940859889373a65050d3f3f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Test that inIon eventually becomes truthy.
// This code should never timeout.

function callInIon() {
    return inIon();
};

function test() {
    // Test with OSR.
    while(!inIon());

    // Test with inlining.
    while(!callInIon());

    // Test with zealous gc preventing compilation.
    while(!inIon()) gc();
};

test();