js/src/jit-test/tests/basic/testNestedDeepBail.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/jit-test/tests/basic/testNestedDeepBail.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,20 @@
     1.4 +var _quit;
     1.5 +function testNestedDeepBail()
     1.6 +{
     1.7 +    _quit = false;
     1.8 +    function loop() {
     1.9 +        for (var i = 0; i < 4; i++)
    1.10 +            ;
    1.11 +    }
    1.12 +    loop();
    1.13 +
    1.14 +    function f() {
    1.15 +        loop();
    1.16 +        _quit = true;
    1.17 +    }
    1.18 +
    1.19 +    var stk = [[1], [], [], [], []];
    1.20 +    while (!_quit)
    1.21 +        stk.pop().forEach(f);
    1.22 +}
    1.23 +testNestedDeepBail();

mercurial