/** * Helper method to compare the contents of two blocks. * * @param a {@code non-null;} a block to compare * @param b {@code non-null;} another block to compare * @return {@code true} iff the two blocks' instructions are the same */ private static boolean compareInsns(BasicBlock a, BasicBlock b) { return a.getInsns().contentEquals(b.getInsns()); }
/** * Helper method to compare the contents of two blocks. * * @param a {@code non-null;} a block to compare * @param b {@code non-null;} another block to compare * @return {@code true} iff the two blocks' instructions are the same */ private static boolean compareInsns(BasicBlock a, BasicBlock b) { return a.getInsns().contentEquals(b.getInsns()); }
/** * Helper method to compare the contents of two blocks. * * @param a {@code non-null;} a block to compare * @param b {@code non-null;} another block to compare * @return {@code true} iff the two blocks' instructions are the same */ private static boolean compareInsns(BasicBlock a, BasicBlock b) { return a.getInsns().contentEquals(b.getInsns()); }
/** * Helper method to compare the contents of two blocks. * * @param a {@code non-null;} a block to compare * @param b {@code non-null;} another block to compare * @return {@code true} iff the two blocks' instructions are the same */ private static boolean compareInsns(BasicBlock a, BasicBlock b) { return a.getInsns().contentEquals(b.getInsns()); }
/** * Helper method to compare the contents of two blocks. * * @param a {@code non-null;} a block to compare * @param b {@code non-null;} another block to compare * @return {@code true} iff the two blocks' instructions are the same */ private static boolean compareInsns(BasicBlock a, BasicBlock b) { return a.getInsns().contentEquals(b.getInsns()); }
/** * Helper method to compare the contents of two blocks. * * @param a {@code non-null;} a block to compare * @param b {@code non-null;} another block to compare * @return {@code true} iff the two blocks' instructions are the same */ private static boolean compareInsns(BasicBlock a, BasicBlock b) { return a.getInsns().contentEquals(b.getInsns()); }
/** * Helper method to compare the contents of two blocks. * * @param a {@code non-null;} a block to compare * @param b {@code non-null;} another block to compare * @return {@code true} iff the two blocks' instructions are the same */ private static boolean compareInsns(BasicBlock a, BasicBlock b) { return a.getInsns().contentEquals(b.getInsns()); }
/** * Helper method to compare the contents of two blocks. * * @param a {@code non-null;} a block to compare * @param b {@code non-null;} another block to compare * @return {@code true} iff the two blocks' instructions are the same */ private static boolean compareInsns(BasicBlock a, BasicBlock b) { return a.getInsns().contentEquals(b.getInsns()); }
/** * Visits each instruction of each block in the list, in order. * * @param visitor {@code non-null;} visitor to use */ public void forEachInsn(Insn.Visitor visitor) { int sz = size(); for (int i = 0; i < sz; i++) { BasicBlock one = get(i); InsnList insns = one.getInsns(); insns.forEach(visitor); } }
/** * Visits each instruction of each block in the list, in order. * * @param visitor {@code non-null;} visitor to use */ public void forEachInsn(Insn.Visitor visitor) { int sz = size(); for (int i = 0; i < sz; i++) { BasicBlock one = get(i); InsnList insns = one.getInsns(); insns.forEach(visitor); } }
/** * Visits each instruction of each block in the list, in order. * * @param visitor {@code non-null;} visitor to use */ public void forEachInsn(Insn.Visitor visitor) { int sz = size(); for (int i = 0; i < sz; i++) { BasicBlock one = get(i); InsnList insns = one.getInsns(); insns.forEach(visitor); } }
/** * Visits each instruction of each block in the list, in order. * * @param visitor {@code non-null;} visitor to use */ public void forEachInsn(Insn.Visitor visitor) { int sz = size(); for (int i = 0; i < sz; i++) { BasicBlock one = get(i); InsnList insns = one.getInsns(); insns.forEach(visitor); } }
/** * Visits each instruction of each block in the list, in order. * * @param visitor {@code non-null;} visitor to use */ public void forEachInsn(Insn.Visitor visitor) { int sz = size(); for (int i = 0; i < sz; i++) { BasicBlock one = get(i); InsnList insns = one.getInsns(); insns.forEach(visitor); } }
/** * Visits each instruction of each block in the list, in order. * * @param visitor {@code non-null;} visitor to use */ public void forEachInsn(Insn.Visitor visitor) { int sz = size(); for (int i = 0; i < sz; i++) { BasicBlock one = get(i); InsnList insns = one.getInsns(); insns.forEach(visitor); } }
/** * Visits each instruction of each block in the list, in order. * * @param visitor {@code non-null;} visitor to use */ public void forEachInsn(Insn.Visitor visitor) { int sz = size(); for (int i = 0; i < sz; i++) { BasicBlock one = get(i); InsnList insns = one.getInsns(); insns.forEach(visitor); } }
/** * Visits each instruction of each block in the list, in order. * * @param visitor {@code non-null;} visitor to use */ public void forEachInsn(Insn.Visitor visitor) { int sz = size(); for (int i = 0; i < sz; i++) { BasicBlock one = get(i); InsnList insns = one.getInsns(); insns.forEach(visitor); } }
/** * Gets the total instruction count for this instance. This is the * sum of the instruction counts of each block. * * @return {@code >= 0;} the total instruction count */ public int getInstructionCount() { int sz = size(); int result = 0; for (int i = 0; i < sz; i++) { BasicBlock one = (BasicBlock) getOrNull0(i); if (one != null) { result += one.getInsns().size(); } } return result; }
/** * Gets the total instruction count for this instance. This is the * sum of the instruction counts of each block. * * @return {@code >= 0;} the total instruction count */ public int getInstructionCount() { int sz = size(); int result = 0; for (int i = 0; i < sz; i++) { BasicBlock one = (BasicBlock) getOrNull0(i); if (one != null) { result += one.getInsns().size(); } } return result; }
/** * Sets up the address arrays. */ private void setupArrays(RopMethod method) { BasicBlockList blocks = method.getBlocks(); int sz = blocks.size(); for (int i = 0; i < sz; i++) { BasicBlock one = blocks.get(i); int label = one.getLabel(); Insn insn = one.getInsns().get(0); starts[label] = new CodeAddress(insn.getPosition()); SourcePosition pos = one.getLastInsn().getPosition(); lasts[label] = new CodeAddress(pos); ends[label] = new CodeAddress(pos); } } }
/** * Sets up the address arrays. */ private void setupArrays(RopMethod method) { BasicBlockList blocks = method.getBlocks(); int sz = blocks.size(); for (int i = 0; i < sz; i++) { BasicBlock one = blocks.get(i); int label = one.getLabel(); Insn insn = one.getInsns().get(0); starts[label] = new CodeAddress(insn.getPosition()); SourcePosition pos = one.getLastInsn().getPosition(); lasts[label] = new CodeAddress(pos); ends[label] = new CodeAddress(pos); } } }