コード例 #1
0
  private void _writeOutFinally(BytecodeContext bc, int lRef) throws BytecodeException {
    // ref.remove(pc);
    // Reference r=null;
    GeneratorAdapter adapter = bc.getAdapter();

    // if(fcf!=null &&
    // fcf.getAfterFinalGOTOLabel()!=null)ASMUtil.visitLabel(adapter,fcf.getFinalEntryLabel());
    ExpressionUtil.visitLine(bc, finallyLine);

    // if (reference != null)
    //    reference.removeEL(pagecontext);
    Label removeEnd = new Label();
    adapter.loadLocal(lRef);
    adapter.ifNull(removeEnd);
    adapter.loadLocal(lRef);
    adapter.loadArg(0);
    adapter.invokeInterface(Types.REFERENCE, REMOVE_EL);
    adapter.pop();
    adapter.visitLabel(removeEnd);

    if (finallyBody != null) finallyBody.writeOut(bc); // finally
    /*if(fcf!=null){
    	Label l = fcf.getAfterFinalGOTOLabel();
    	if(l!=null)adapter.visitJumpInsn(Opcodes.GOTO, l);
    }*/
  }