/** * Gets the address immediately after this instance. This is only * calculable if this instance's address is known, and it is equal * to the address plus the length of the instruction format of this * instance's opcode. * * @return {@code >= 0;} the next address */ public final int getNextAddress() { return getAddress() + codeSize(); }
/** * Gets the address immediately after this instance. This is only * calculable if this instance's address is known, and it is equal * to the address plus the length of the instruction format of this * instance's opcode. * * @return {@code >= 0;} the next address */ public final int getNextAddress() { return getAddress() + codeSize(); }
/** * Gets the address immediately after this instance. This is only * calculable if this instance's address is known, and it is equal * to the address plus the length of the instruction format of this * instance's opcode. * * @return {@code >= 0;} the next address */ public final int getNextAddress() { return getAddress() + codeSize(); }
/** * Gets the address immediately after this instance. This is only * calculable if this instance's address is known, and it is equal * to the address plus the length of the instruction format of this * instance's opcode. * * @return {@code >= 0;} the next address */ public final int getNextAddress() { return getAddress() + codeSize(); }
/** * Helper for {@link #assignAddressesAndFixBranches}, which * assigns an address to each instruction, in order. */ private void assignAddresses() { int address = 0; int size = insns.size(); for (int i = 0; i < size; i++) { DalvInsn insn = insns.get(i); insn.setAddress(address); address += insn.codeSize(); } }
/** * Gets the address immediately after this instance. This is only * calculable if this instance's address is known, and it is equal * to the address plus the length of the instruction format of this * instance's opcode. * * @return {@code >= 0;} the next address */ public final int getNextAddress() { return getAddress() + codeSize(); }
/** * Gets the address immediately after this instance. This is only * calculable if this instance's address is known, and it is equal * to the address plus the length of the instruction format of this * instance's opcode. * * @return {@code >= 0;} the next address */ public final int getNextAddress() { return getAddress() + codeSize(); }
/** * Gets the address immediately after this instance. This is only * calculable if this instance's address is known, and it is equal * to the address plus the length of the instruction format of this * instance's opcode. * * @return {@code >= 0;} the next address */ public final int getNextAddress() { return getAddress() + codeSize(); }
/** * Helper for {@link #assignAddressesAndFixBranches}, which * assigns an address to each instruction, in order. */ private void assignAddresses() { int address = 0; int size = insns.size(); for (int i = 0; i < size; i++) { DalvInsn insn = insns.get(i); insn.setAddress(address); address += insn.codeSize(); } }
/** * Helper for {@link #assignAddressesAndFixBranches}, which * assigns an address to each instruction, in order. */ private void assignAddresses() { int address = 0; int size = insns.size(); for (int i = 0; i < size; i++) { DalvInsn insn = insns.get(i); insn.setAddress(address); address += insn.codeSize(); } }
/** * Gets the address immediately after this instance. This is only * calculable if this instance's address is known, and it is equal * to the address plus the length of the instruction format of this * instance's opcode. * * @return {@code >= 0;} the next address */ public final int getNextAddress() { return getAddress() + codeSize(); }
/** * Helper for {@link #assignAddressesAndFixBranches}, which * assigns an address to each instruction, in order. */ private void assignAddresses() { int address = 0; int size = insns.size(); for (int i = 0; i < size; i++) { DalvInsn insn = insns.get(i); insn.setAddress(address); address += insn.codeSize(); } }
/** * Helper for {@link #assignAddressesAndFixBranches}, which * assigns an address to each instruction, in order. */ private void assignAddresses() { int address = 0; int size = insns.size(); for (int i = 0; i < size; i++) { DalvInsn insn = insns.get(i); insn.setAddress(address); address += insn.codeSize(); } }
/** * Helper for {@link #assignAddressesAndFixBranches}, which * assigns an address to each instruction, in order. */ private void assignAddresses() { int address = 0; int size = insns.size(); for (int i = 0; i < size; i++) { DalvInsn insn = insns.get(i); insn.setAddress(address); address += insn.codeSize(); } }
/** * Helper for {@link #assignAddressesAndFixBranches}, which * assigns an address to each instruction, in order. */ private void assignAddresses() { int address = 0; int size = insns.size(); for (int i = 0; i < size; i++) { DalvInsn insn = insns.get(i); insn.setAddress(address); address += insn.codeSize(); } }
/** * Helper for {@link #assignAddressesAndFixBranches}, which * assigns an address to each instruction, in order. */ private void assignAddresses() { int address= 0; int size= insns.size(); for (int i= 0; i < size; i++) { DalvInsn insn= insns.get(i); insn.setAddress(address); address+= insn.codeSize(); } }
/** * Does a human-friendly dump of this instance. * * @param out {@code non-null;} where to dump * @param prefix {@code non-null;} prefix to attach to each line of output * @param verbose whether to be verbose; verbose output includes * lines for zero-size instructions and explicit constant pool indices */ public void debugPrint(Writer out, String prefix, boolean verbose) { IndentingWriter iw = new IndentingWriter(out, 0, prefix); int sz = size(); try { for (int i = 0; i < sz; i++) { DalvInsn insn = (DalvInsn) get0(i); String s; if ((insn.codeSize() != 0) || verbose) { s = insn.listingString("", 0, verbose); } else { s = null; } if (s != null) { iw.write(s); } } iw.flush(); } catch (IOException ex) { throw new RuntimeException(ex); } }
/** * Does a human-friendly dump of this instance. * * @param out {@code non-null;} where to dump * @param prefix {@code non-null;} prefix to attach to each line of output * @param verbose whether to be verbose; verbose output includes * lines for zero-size instructions and explicit constant pool indices */ public void debugPrint(Writer out, String prefix, boolean verbose) { IndentingWriter iw = new IndentingWriter(out, 0, prefix); int sz = size(); try { for (int i = 0; i < sz; i++) { DalvInsn insn = (DalvInsn) get0(i); String s; if ((insn.codeSize() != 0) || verbose) { s = insn.listingString("", 0, verbose); } else { s = null; } if (s != null) { iw.write(s); } } iw.flush(); } catch (IOException ex) { throw new RuntimeException(ex); } }
/** * Does a human-friendly dump of this instance. * * @param out {@code non-null;} where to dump * @param prefix {@code non-null;} prefix to attach to each line of output * @param verbose whether to be verbose; verbose output includes * lines for zero-size instructions and explicit constant pool indices */ public void debugPrint(Writer out, String prefix, boolean verbose) { IndentingWriter iw = new IndentingWriter(out, 0, prefix); int sz = size(); try { for (int i = 0; i < sz; i++) { DalvInsn insn = (DalvInsn) get0(i); String s; if ((insn.codeSize() != 0) || verbose) { s = insn.listingString("", 0, verbose); } else { s = null; } if (s != null) { iw.write(s); } } iw.flush(); } catch (IOException ex) { throw new RuntimeException(ex); } }
/** * Does a human-friendly dump of this instance. * * @param out {@code non-null;} where to dump * @param prefix {@code non-null;} prefix to attach to each line of output * @param verbose whether to be verbose; verbose output includes * lines for zero-size instructions and explicit constant pool indices */ public void debugPrint(Writer out, String prefix, boolean verbose) { IndentingWriter iw = new IndentingWriter(out, 0, prefix); int sz = size(); try { for (int i = 0; i < sz; i++) { DalvInsn insn = (DalvInsn) get0(i); String s; if ((insn.codeSize() != 0) || verbose) { s = insn.listingString("", 0, verbose); } else { s = null; } if (s != null) { iw.write(s); } } iw.flush(); } catch (IOException ex) { throw new RuntimeException(ex); } }