+ lastInst.getInstruction().getLength();
if (last != null) { return last.getPosition() + last.getInstruction().getLength();
+ lvgEnd.getInstruction().getLength() >= offset));
+ last.getInstruction().getLength();
/** * Dump instruction as byte code to stream out. * @param out Output stream */ @Override public void dump( final DataOutputStream out ) throws IOException { if (wide()) { out.writeByte(Const.WIDE); } out.writeByte(super.getOpcode()); if (super.getLength() > 1) { // Otherwise ILOAD_n, instruction, e.g. if (wide()) { out.writeShort(n); } else { out.writeByte(n); } } }
/** * Get CodeException object.<BR> * * This relies on that the instruction list has already been dumped * to byte code or or that the `setPositions' methods has been * called for the instruction list. * * @param cp constant pool */ public CodeException getCodeException( final ConstantPoolGen cp ) { return new CodeException(start_pc.getPosition(), end_pc.getPosition() + end_pc.getInstruction().getLength(), handler_pc.getPosition(), (catch_type == null) ? 0 : cp.addClass(catch_type)); }
/** * Get CodeException object.<BR> * * This relies on that the instruction list has already been dumped * to byte code or or that the `setPositions' methods has been * called for the instruction list. * * @param cp constant pool */ public CodeException getCodeException(ConstantPoolGen cp) { return new CodeException(start_pc.getPosition(), end_pc.getPosition() + end_pc.getInstruction().getLength(), handler_pc.getPosition(), (catch_type == null)? 0 : cp.addClass(catch_type)); }
if (last != null) { return last.getPosition() + last.getInstruction().getLength();
/** * Get LocalVariable object. * * This relies on that the instruction list has already been dumped to byte code or * or that the `setPositions' methods has been called for the instruction list. * * Note that for local variables whose scope end at the last * instruction of the method's code, the JVM specification is ambiguous: * both a start_pc+length ending at the last instruction and * start_pc+length ending at first index beyond the end of the code are * valid. * * @param il instruction list (byte code) which this variable belongs to * @param cp constant pool */ public LocalVariable getLocalVariable(ConstantPoolGen cp) { int start_pc = start.getPosition(); int length = end.getPosition() - start_pc; if(length > 0) length += end.getInstruction().getLength(); int name_index = cp.addUtf8(name); int signature_index = cp.addUtf8(type.getSignature()); return new LocalVariable(start_pc, length, name_index, signature_index, index, cp.getConstantPool()); }
/** * Get LocalVariable object. * * This relies on that the instruction list has already been dumped to byte code or * or that the `setPositions' methods has been called for the instruction list. * * Note that due to the conversion from byte code offset to InstructionHandle, * it is impossible to tell the difference between a live range that ends BEFORE * the last insturction of the method or a live range that ends AFTER the last * instruction of the method. Hence the live_to_end flag to differentiate * between these two cases. * * @param cp constant pool */ public LocalVariable getLocalVariable( final ConstantPoolGen cp ) { int start_pc = 0; int length = 0; if ((start != null) && (end != null)) { start_pc = start.getPosition(); length = end.getPosition() - start_pc; if ((end.getNext() == null) && live_to_end) { length += end.getInstruction().getLength(); } } final int name_index = cp.addUtf8(name); final int signature_index = cp.addUtf8(type.getSignature()); return new LocalVariable(start_pc, length, name_index, signature_index, index, cp .getConstantPool(), orig_index); }
+ lvgEnd.getInstruction().getLength() >= offset));
+ lvgEnd.getInstruction().getLength() >= offset));
+ lvgEnd.getInstruction().getLength() >= offset));
for (final InstructionHandle ih : ihs) size += ih.getInstruction().getLength();