summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testNestedDeepBail.js
blob: 8e59b04cdaab6e193ae53c4f55aa1bde7d115fc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
var _quit;
function testNestedDeepBail()
{
    _quit = false;
    function loop() {
        for (var i = 0; i < 4; i++)
            ;
    }
    loop();

    function f() {
        loop();
        _quit = true;
    }

    var stk = [[1], [], [], [], []];
    while (!_quit)
        stk.pop().forEach(f);
}
testNestedDeepBail();