| 234 | _continueScope = savedContinueScope; |
| 235 | _breakScope = savedBreakScope; |
| 236 | |
| 237 | // At exit the false control is the current control, and |
| 238 | // the scope is the exit scope after the exit test. |
| 239 | return _scope = exit; |
| 240 | } |
| 241 | |
| 242 | private ScopeNode jumpTo(ScopeNode toScope) { |
| 243 | ScopeNode cur = _scope.dup(); |
| 244 | ctrl(new ConstantNode(Type.XCONTROL).peephole()); // Kill current scope |
| 245 | // Prune nested lexical scopes that have depth > than the loop head |
| 246 | // We use _breakScope as a proxy for the loop head scope to obtain the depth |
| 247 | while( cur._scopes.size() > _breakScope._scopes.size() ) |
| 248 | cur.pop(); |
| 249 | // If this is a continue then first time the target is null |
| 250 | // So we just use the pruned current scope as the base for the |
| 251 | // continue |
| 252 | if (toScope == null) |
| 253 | return cur; |
| 254 | // toScope is either the break scope, or a scope that was created here |
| 255 | assert toScope._scopes.size() <= _breakScope._scopes.size(); |