PageRenderTime 18ms CodeModel.GetById 10ms app.highlight 4ms RepoModel.GetById 2ms app.codeStats 0ms

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

http://github.com/zpao/v8monkey
JavaScript | 20 lines | 18 code | 2 blank | 0 comment | 2 complexity | 8e29dfd959fab16dc473035c9ed00a41 MD5 | raw file
 1var _quit;
 2function testNestedDeepBail()
 3{
 4    _quit = false;
 5    function loop() {
 6        for (var i = 0; i < 4; i++)
 7            ;
 8    }
 9    loop();
10
11    function f() {
12        loop();
13        _quit = true;
14    }
15
16    var stk = [[1], [], [], [], []];
17    while (!_quit)
18        stk.pop().forEach(f);
19}
20testNestedDeepBail();