summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/self-test/inIon.js
blob: e14a0bc4a91ad6b5c423401b9a49adf22b8bab53 (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(this, 'shrinking');
};

test();