/** * Instructions are equal if their opcodes are the same. Subclasses * should override this method to perform a template comparison: * instructions should compare equal to other instructions of the same * type where the data is either the same or the data is unset. */ public boolean equalsInstruction(Instruction other) { if (other == this) return true; return other.getOpcode() == getOpcode(); }
/** * Instructions are equal if their opcodes are the same. Subclasses * should override this method to perform a template comparison: * instructions should compare equal to other instructions of the same * type where the data is either the same or the data is unset. */ public boolean equalsInstruction(Instruction other) { if (other == this) return true; return other.getOpcode() == getOpcode(); }
private void writeCode(DataOutput out) throws IOException { Instruction ins; for (CodeEntry entry = _head.next; entry != _tail; entry = entry.next) { ins = (Instruction) entry; out.writeByte(ins.getOpcode()); ins.write(out); } }
private void writeCode(DataOutput out) throws IOException { Instruction ins; for (CodeEntry entry = _head.next; entry != _tail; entry = entry.next) { ins = (Instruction) entry; out.writeByte(ins.getOpcode()); ins.write(out); } }
/** * Adds a copy of the given instruction. * * @return the newly added instruction */ public Instruction add(Instruction ins) { Instruction newIns = createInstruction(ins.getOpcode()); newIns.read(ins); _ci.add(newIns); return newIns; }
/** * Adds a copy of the given instruction. * * @return the newly added instruction */ public Instruction add(Instruction ins) { Instruction newIns = createInstruction(ins.getOpcode()); newIns.read(ins); _ci.add(newIns); return newIns; }
/** * Set the type of instruction this wide instruction modifies. */ public WideInstruction setInstruction(Instruction ins) { if (ins == null) return setInstruction(Constants.NOP); setInstruction(ins.getOpcode()); if (_ins == Constants.IINC) _inc = ((IIncInstruction) ins).getIncrement(); return this; }
/** * Set the type of instruction this wide instruction modifies. */ public WideInstruction setInstruction(Instruction ins) { if (ins == null) return setInstruction(Constants.NOP); setInstruction(ins.getOpcode()); if (_ins == Constants.IINC) _inc = ((IIncInstruction) ins).getIncrement(); return this; }
/** * Replaces the last iterated instruction with a copy of the given one. * This method will also make sure that all jump points * that referenced the old opcode are updated correctly. * * @return the newly added instruction * @see ListIterator#set */ public Instruction set(Instruction ins) { Instruction newIns = createInstruction(ins.getOpcode()); newIns.read(ins); _ci.set(newIns); return newIns; }
/** * Replaces the last iterated instruction with a copy of the given one. * This method will also make sure that all jump points * that referenced the old opcode are updated correctly. * * @return the newly added instruction * @see ListIterator#set */ public Instruction set(Instruction ins) { Instruction newIns = createInstruction(ins.getOpcode()); newIns.read(ins); _ci.set(newIns); return newIns; }
entry = entry.next) { origIns = (Instruction) entry; ins = createInstruction(origIns.getOpcode()); _ci.addInternal(ins); if (!(ins instanceof ConstantInstruction))
entry = entry.next) { origIns = (Instruction) entry; ins = createInstruction(origIns.getOpcode()); _ci.addInternal(ins); if (!(ins instanceof ConstantInstruction))