@Override public void process( final MethodTranslator methodTranslator, final Instruction instruction, final InstructionHandle handle, final Writer out) throws IOException { final IFNONNULL ifnonnul = (IFNONNULL) instruction; final BranchHandle branchHandler = (BranchHandle) handle; final String label = LabelAndFrameUtils.makeClassMethodJumpLabel( methodTranslator.getMethod(), branchHandler.getTarget().getPosition()); out.write(template.replace(MACROS_ADDRESS, label)); out.write(NEXT_LINE); }
/** * Insert an instruction before instruction (handle) ih contained in this list. * * @param ih where to insert to the instruction list * @param i Instruction to insert * @return instruction handle of the first inserted instruction */ public BranchHandle insert(InstructionHandle ih, BranchInstruction i) { BranchHandle bh = BranchHandle.getBranchHandle(i); InstructionList il = new InstructionList(); il.append(bh); insert(ih, il); return bh; }
/** * Insert a branch instruction at start of this list. * * @param i branch instruction to insert * @return branch instruction handle of the appended instruction */ public BranchHandle insert(BranchInstruction i) { BranchHandle ih = BranchHandle.getBranchHandle(i); insert(ih); return ih; }
/** * Append a branch instruction to the end of this list. * * @param i branch instruction to append * @return branch instruction handle of the appended instruction */ public BranchHandle append(BranchInstruction i) { BranchHandle ih = BranchHandle.getBranchHandle(i); append(ih); return ih; }