public void applyFinallyBlocks() { applyFinallyBlocks(finallyBlocks); }
public void applyFinallyBlocks() { applyFinallyBlocks(finallyBlocks); }
public void applyFinallyBlocks() { applyFinallyBlocks(finallyBlocks); }
public void applyFinallyBlocks(Label label, boolean isBreakLabel) { // first find the state defining the label. That is the state // directly after the state not knowing this label. If no state // in the list knows that label, then the defining state is the // current state. StateStackElement result = null; for (ListIterator iter = stateStack.listIterator(stateStack.size()); iter.hasPrevious();) { StateStackElement element = (StateStackElement) iter.previous(); if (!element.currentBlockNamedLabels.values().contains(label)) { if (isBreakLabel && element.breakLabel != label) { result = element; break; } if (!isBreakLabel && element.continueLabel != label) { result = element; break; } } } List blocksToRemove; if (result==null) { // all Blocks do know the label, so use all finally blocks blocksToRemove = Collections.EMPTY_LIST; } else { blocksToRemove = result.finallyBlocks; } ArrayList blocks = new ArrayList(finallyBlocks); blocks.removeAll(blocksToRemove); applyFinallyBlocks(blocks); }
public void visitBreakStatement(BreakStatement statement) { onLineNumber(statement, "visitBreakStatement"); visitStatement(statement); String name = statement.getLabel(); Label breakLabel = compileStack.getNamedBreakLabel(name); compileStack.applyFinallyBlocks(breakLabel, true); mv.visitJumpInsn(GOTO, breakLabel); }
public void visitBreakStatement(BreakStatement statement) { onLineNumber(statement, "visitBreakStatement"); visitStatement(statement); String name = statement.getLabel(); Label breakLabel = compileStack.getNamedBreakLabel(name); compileStack.applyFinallyBlocks(breakLabel, true); mv.visitJumpInsn(GOTO, breakLabel); }
public void visitBreakStatement(BreakStatement statement) { onLineNumber(statement, "visitBreakStatement"); visitStatement(statement); String name = statement.getLabel(); Label breakLabel = compileStack.getNamedBreakLabel(name); compileStack.applyFinallyBlocks(breakLabel, true); mv.visitJumpInsn(GOTO, breakLabel); }
public void visitContinueStatement(ContinueStatement statement) { onLineNumber(statement, "visitContinueStatement"); visitStatement(statement); String name = statement.getLabel(); Label continueLabel = compileStack.getContinueLabel(); if (name != null) continueLabel = compileStack.getNamedContinueLabel(name); compileStack.applyFinallyBlocks(continueLabel, false); mv.visitJumpInsn(GOTO, continueLabel); }
public void visitContinueStatement(ContinueStatement statement) { onLineNumber(statement, "visitContinueStatement"); visitStatement(statement); String name = statement.getLabel(); Label continueLabel = compileStack.getContinueLabel(); if (name != null) continueLabel = compileStack.getNamedContinueLabel(name); compileStack.applyFinallyBlocks(continueLabel, false); mv.visitJumpInsn(GOTO, continueLabel); }
public void visitContinueStatement(ContinueStatement statement) { onLineNumber(statement, "visitContinueStatement"); visitStatement(statement); String name = statement.getLabel(); Label continueLabel = compileStack.getContinueLabel(); if (name != null) continueLabel = compileStack.getNamedContinueLabel(name); compileStack.applyFinallyBlocks(continueLabel, false); mv.visitJumpInsn(GOTO, continueLabel); }
throwException("Cannot use return statement with an expression on a method that returns void"); compileStack.applyFinallyBlocks(); mv.visitInsn(RETURN); outputReturn = true; compileStack.applyFinallyBlocks(); helper.load(ClassHelper.OBJECT_TYPE, returnValueIdx);
throwException("Cannot use return statement with an expression on a method that returns void"); compileStack.applyFinallyBlocks(); mv.visitInsn(RETURN); outputReturn = true; compileStack.applyFinallyBlocks(); helper.load(ClassHelper.OBJECT_TYPE, returnValueIdx);
throwException("Cannot use return statement with an expression on a method that returns void"); compileStack.applyFinallyBlocks(); mv.visitInsn(RETURN); outputReturn = true; compileStack.applyFinallyBlocks(); helper.load(ClassHelper.OBJECT_TYPE, returnValueIdx);