/** * Remembers to place the given instructions right after the instruction * at the given offset. * @param instructionOffset the offset of the instruction. * @param instructions the new instructions. */ public void insertAfterInstruction(int instructionOffset, Instruction[] instructions) { if (instructionOffset < 0 || instructionOffset >= codeLength) { throw new IllegalArgumentException("Invalid instruction offset ["+instructionOffset+"] in code with length ["+codeLength+"]"); } postInsertions[instructionOffset] = new CompositeInstruction(instructions); modified = true; simple = false; }
/** * Remembers to place the given instructions right before the instruction * at the given offset. Any branches to the existing instruction will * land after the new instructions. Similarly, any try blocks that start at * the existing instruction will not include the new instructions. However, * any try blocks that end right before the existing instruction wil now * include the new instructions. * @param instructionOffset the offset of the instruction. * @param instructions the new instructions. */ public void insertBeforeOffset(int instructionOffset, Instruction[] instructions) { if (instructionOffset < 0 || instructionOffset >= codeLength) { throw new IllegalArgumentException("Invalid instruction offset ["+instructionOffset+"] in code with length ["+codeLength+"]"); } CompositeInstruction instruction = new CompositeInstruction(instructions); preOffsetInsertions[instructionOffset] = shrinkInstructions ? instruction.shrink() : instruction; modified = true; simple = false; }
/** * Remembers to place the given instructions right before the instruction * at the given offset. Any branches to the existing instruction will * land after the new instructions. Similarly, any try blocks that start at * the existing instruction will not include the new instructions. However, * any try blocks that end right before the existing instruction wil now * include the new instructions. * @param instructionOffset the offset of the instruction. * @param instructions the new instructions. */ public void insertBeforeOffset(int instructionOffset, Instruction[] instructions) { if (instructionOffset < 0 || instructionOffset >= codeLength) { throw new IllegalArgumentException("Invalid instruction offset ["+instructionOffset+"] in code with length ["+codeLength+"]"); } CompositeInstruction instruction = new CompositeInstruction(instructions); preOffsetInsertions[instructionOffset] = shrinkInstructions ? instruction.shrink() : instruction; modified = true; simple = false; }
/** * Remembers to place the given instructions right before the instruction * at the given offset. Any branches to the existing instruction will * also go to the new instructions. Similarly, any try blocks that include * the existing instruction will also include the new instructions. * @param instructionOffset the offset of the instruction. * @param instructions the new instructions. */ public void insertBeforeInstruction(int instructionOffset, Instruction[] instructions) { if (instructionOffset < 0 || instructionOffset >= codeLength) { throw new IllegalArgumentException("Invalid instruction offset ["+instructionOffset+"] in code with length ["+codeLength+"]"); } CompositeInstruction instruction = new CompositeInstruction(instructions); preInsertions[instructionOffset] = shrinkInstructions ? instruction.shrink() : instruction; modified = true; simple = false; }
/** * Remembers to place the given instructions right before the instruction * at the given offset. Any branches to the existing instruction will * also go to the new instructions. Similarly, any try blocks that include * the existing instruction will also include the new instructions. * @param instructionOffset the offset of the instruction. * @param instructions the new instructions. */ public void insertBeforeInstruction(int instructionOffset, Instruction[] instructions) { if (instructionOffset < 0 || instructionOffset >= codeLength) { throw new IllegalArgumentException("Invalid instruction offset ["+instructionOffset+"] in code with length ["+codeLength+"]"); } CompositeInstruction instruction = new CompositeInstruction(instructions); preInsertions[instructionOffset] = shrinkInstructions ? instruction.shrink() : instruction; modified = true; simple = false; }
/** * Remembers to place the given instructions right before the instruction * at the given offset. Any branches to the existing instruction will * also go to the new instructions. Similarly, any try blocks that include * the existing instruction will also include the new instructions. * @param instructionOffset the offset of the instruction. * @param instructions the new instructions. */ public void insertBeforeInstruction(int instructionOffset, Instruction[] instructions) { if (instructionOffset < 0 || instructionOffset >= codeLength) { throw new IllegalArgumentException("Invalid instruction offset ["+instructionOffset+"] in code with length ["+codeLength+"]"); } CompositeInstruction instruction = new CompositeInstruction(instructions); preInsertions[instructionOffset] = shrinkInstructions ? instruction.shrink() : instruction; modified = true; simple = false; }
/** * Remembers to place the given instructions right before the instruction * at the given offset. Any branches to the existing instruction will * land after the new instructions. Similarly, any try blocks that start at * the existing instruction will not include the new instructions. However, * any try blocks that end right before the existing instruction wil now * include the new instructions. * @param instructionOffset the offset of the instruction. * @param instructions the new instructions. */ public void insertBeforeOffset(int instructionOffset, Instruction[] instructions) { if (instructionOffset < 0 || instructionOffset >= codeLength) { throw new IllegalArgumentException("Invalid instruction offset ["+instructionOffset+"] in code with length ["+codeLength+"]"); } CompositeInstruction instruction = new CompositeInstruction(instructions); preOffsetInsertions[instructionOffset] = shrinkInstructions ? instruction.shrink() : instruction; modified = true; simple = false; }
/** * Remembers to place the given instructions right after the instruction * at the given offset. * @param instructionOffset the offset of the instruction. * @param instructions the new instructions. */ public void insertAfterInstruction(int instructionOffset, Instruction[] instructions) { if (instructionOffset < 0 || instructionOffset >= codeLength) { throw new IllegalArgumentException("Invalid instruction offset ["+instructionOffset+"] in code with length ["+codeLength+"]"); } CompositeInstruction instruction = new CompositeInstruction(instructions); postInsertions[instructionOffset] = shrinkInstructions ? instruction.shrink() : instruction; modified = true; simple = false; }
/** * Remembers to place the given instructions right after the instruction * at the given offset. * @param instructionOffset the offset of the instruction. * @param instructions the new instructions. */ public void insertAfterInstruction(int instructionOffset, Instruction[] instructions) { if (instructionOffset < 0 || instructionOffset >= codeLength) { throw new IllegalArgumentException("Invalid instruction offset ["+instructionOffset+"] in code with length ["+codeLength+"]"); } CompositeInstruction instruction = new CompositeInstruction(instructions); postInsertions[instructionOffset] = shrinkInstructions ? instruction.shrink() : instruction; modified = true; simple = false; }
/** * Remembers to place the given instructions right after the instruction * at the given offset. * @param instructionOffset the offset of the instruction. * @param instructions the new instructions. */ public void insertAfterInstruction(int instructionOffset, Instruction[] instructions) { if (instructionOffset < 0 || instructionOffset >= codeLength) { throw new IllegalArgumentException("Invalid instruction offset ["+instructionOffset+"] in code with length ["+codeLength+"]"); } CompositeInstruction instruction = new CompositeInstruction(instructions); postInsertions[instructionOffset] = shrinkInstructions ? instruction.shrink() : instruction; modified = true; simple = false; }
/** * Remembers to replace the instruction at the given offset by the given * instructions. * @param instructionOffset the offset of the instruction to be replaced. * @param instructions the new instructions. */ public void replaceInstruction(int instructionOffset, Instruction[] instructions) { if (instructionOffset < 0 || instructionOffset >= codeLength) { throw new IllegalArgumentException("Invalid instruction offset ["+instructionOffset+"] in code with length ["+codeLength+"]"); } CompositeInstruction instruction = new CompositeInstruction(instructions); replacements[instructionOffset] = shrinkInstructions ? instruction.shrink() : instruction; modified = true; }
/** * Remembers to replace the instruction at the given offset by the given * instructions. * @param instructionOffset the offset of the instruction to be replaced. * @param instructions the new instructions. */ public void replaceInstruction(int instructionOffset, Instruction[] instructions) { if (instructionOffset < 0 || instructionOffset >= codeLength) { throw new IllegalArgumentException("Invalid instruction offset ["+instructionOffset+"] in code with length ["+codeLength+"]"); } CompositeInstruction instruction = new CompositeInstruction(instructions); replacements[instructionOffset] = shrinkInstructions ? instruction.shrink() : instruction; modified = true; }
/** * Remembers to replace the instruction at the given offset by the given * instructions. * @param instructionOffset the offset of the instruction to be replaced. * @param instructions the new instructions. */ public void replaceInstruction(int instructionOffset, Instruction[] instructions) { if (instructionOffset < 0 || instructionOffset >= codeLength) { throw new IllegalArgumentException("Invalid instruction offset ["+instructionOffset+"] in code with length ["+codeLength+"]"); } CompositeInstruction instruction = new CompositeInstruction(instructions); replacements[instructionOffset] = shrinkInstructions ? instruction.shrink() : instruction; modified = true; }
/** * Remembers to place the given instructions right before the instruction * at the given offset. * @param instructionOffset the offset of the instruction. * @param instructions the new instructions. */ public void insertBeforeInstruction(int instructionOffset, Instruction[] instructions) { if (instructionOffset < 0 || instructionOffset >= codeLength) { throw new IllegalArgumentException("Invalid instruction offset ["+instructionOffset+"] in code with length ["+codeLength+"]"); } preInsertions[instructionOffset] = new CompositeInstruction(instructions); modified = true; simple = false; }
/** * Remembers to replace the instruction at the given offset by the given * instructions. * @param instructionOffset the offset of the instruction to be replaced. * @param instructions the new instructions. */ public void replaceInstruction(int instructionOffset, Instruction[] instructions) { if (instructionOffset < 0 || instructionOffset >= codeLength) { throw new IllegalArgumentException("Invalid instruction offset ["+instructionOffset+"] in code with length ["+codeLength+"]"); } replacements[instructionOffset] = new CompositeInstruction(instructions); modified = true; }