michael@0: var _quit; michael@0: function testNestedDeepBail() michael@0: { michael@0: _quit = false; michael@0: function loop() { michael@0: for (var i = 0; i < 4; i++) michael@0: ; michael@0: } michael@0: loop(); michael@0: michael@0: function f() { michael@0: loop(); michael@0: _quit = true; michael@0: } michael@0: michael@0: var stk = [[1], [], [], [], []]; michael@0: while (!_quit) michael@0: stk.pop().forEach(f); michael@0: } michael@0: testNestedDeepBail();