Uses of Class
serp.bytecode.Instruction
Packages that use Instruction
-
Uses of Instruction in serp.bytecode
Subclasses of Instruction in serp.bytecodeModifier and TypeClassDescriptionclass
Any array load or store instruction.class
Loads a value from an array onto the stack.class
Store a value from the stack into an array.class
An instruction that takes as an argument a class to operate on.class
An instruction comparing two stack values.class
An instruction that that loads a constant onto the stack.class
A conversion opcode such asi2l, f2i
, etc.class
Instruction that takes as an argument a field to operate on.class
Loads a value from a field onto the stack.class
An instruction that specifies a position in the code block to jump to.class
An if instruction such asifnull, ifeq
, etc.class
Theiinc
instruction.class
An instruction that specifies a position in the code block to jump to.class
Loads a value from the locals table to the stack.class
An instruction that has an argument of an index into the local variable table of the current frame.class
Thelookupswitch
instruction.class
One of the math operations defined in theConstants
interface.class
An instruction that invokes a method.class
Themonitorenter
instruction.class
Themonitorexit
instruction.class
A synchronization instruction.class
Themultianewarray
instruction, which creates a new multi-dimensional array.class
Thenewarray
instruction, which is used to create new arrays of primitive types.class
Stores a value from the stack into a field.class
Theret
instruction is used in the implementation of finally.class
Returns a value (or void) from a method.class
Represents an instruction that manipulates the stack of the current frame.class
An instruction to store a value from a local variable onto the stack.class
Contains functionality common to the different switch types (TableSwitch and LookupSwitch).class
Thetableswitch
instruction.class
Any typed instruction.class
Thewide
instruction, which is used to allow other instructions to index values beyond what they can normally index baed on the length of their arguments.Fields in serp.bytecode declared as InstructionModifier and TypeFieldDescriptionprivate Instruction
Local._end
private Instruction
ClassConstantInstruction._ins
private Instruction
Code.CodeIterator._last
private Instruction
InstructionPtrStrategy._target
Methods in serp.bytecode that return InstructionModifier and TypeMethodDescriptionCode.add
(Instruction ins) Adds a copy of the given instruction.private Instruction
Code.addInstruction
(int opcode) private Instruction
Code.addInstruction
(Instruction ins) Code.arraylength()
Get the length of an array on the stack; thearraylength
opcode.Code.athrow()
Throw an exception; theathrow
opcode.private Instruction
Code.createInstruction
(int opcode) Creates an Instruction, with this code block as the owner.private Instruction
LookupSwitchInstruction.findJumpPoint
(int jumpByteIndex, List inss) private Instruction
TableSwitchInstruction.findTarget
(int jumpByteIndex, List inss) LookupSwitchInstruction.getDefaultTarget()
Synonymous withJumpInstruction.getTarget()
.SwitchInstruction.getDefaultTarget()
Synonymous withJumpInstruction.getTarget()
.TableSwitchInstruction.getDefaultTarget()
Synonymous withJumpInstruction.getTarget()
.Local.getEnd()
The lastInstruction
for which this local is in scope.(package private) Instruction
Code.getFirstInstruction()
Return the first instruction in this code block, or null if none.ExceptionHandler.getHandlerStart()
Return the instruction marking the beginning of the catch {} block.(package private) Instruction
Code.getInstruction
(int byteIndex) Returns the instruction in this code block found at the given byte index.Code.getInstructions()
Return all the Instructions of this method.(package private) Instruction
Code.getLastInstruction()
Return the last instruction in this code block, or null if none.LineNumber.getStart()
Return the instruction marking the beginning of this line.Local.getStart()
Return the instruction marking the beginning of this local.JumpInstruction.getTarget()
Get the current target instruction to jump to, if it has been set.InstructionPtrStrategy.getTargetInstruction()
Returns the Instruction this Target is targetting.LookupSwitchInstruction.getTargets()
Return the targets of the case statements for this switch.SwitchInstruction.getTargets()
Return the targets for this switch, or empty array if not set.TableSwitchInstruction.getTargets()
Return the targets for this switch, or empty array if not set.ExceptionHandler.getTryEnd()
Return the instruction at the end of the try {} block.ExceptionHandler.getTryStart()
Return the instruction marking the beginning of the try {} block.Code.next()
Return the next instruction.Code.nop()
Add thenop
opcode.Code.previous()
Return the previous instruction.Code.set
(Instruction ins) Replaces the last iterated instruction with a copy of the given one.Set the type of class being loaded.Set the type of class being loaded.Set the type of class being loaded.(package private) Instruction
Instruction.setOpcode
(int opcode) Set the opcode this instruction represents.Methods in serp.bytecode with parameters of type InstructionModifier and TypeMethodDescriptionCode.add
(Instruction ins) Adds a copy of the given instruction.LookupSwitchInstruction.addCase
(int match, Instruction target) Add a case to this switch.SwitchInstruction.addCase
(int match, Instruction target) Add a case to this switch.Code.addExceptionHandler
(Instruction tryStart, Instruction tryEnd, Instruction handlerStart, Class catchType) Add an exception handler to this code block.Code.addExceptionHandler
(Instruction tryStart, Instruction tryEnd, Instruction handlerStart, String catchType) Add an exception handler to this code block.Code.addExceptionHandler
(Instruction tryStart, Instruction tryEnd, Instruction handlerStart, BCClass catchType) Add an exception handler to this code block.private Instruction
Code.addInstruction
(Instruction ins) LineNumberTable.addLineNumber
(Instruction start, int line) Add a new line number to this table.SwitchInstruction.addTarget
(Instruction target) Add a target to this switch.TableSwitchInstruction.addTarget
(Instruction target) Add a target to this switch.void
Code.after
(Instruction ins) Position the iterator just after the given instruction.void
Code.before
(Instruction ins) Position the iterator just before the given instruction.boolean
ClassInstruction.equalsInstruction
(Instruction other) ClassInstructions are equal if the type they reference is the same or unset and if their opcodes are equal.boolean
ConstantInstruction.equalsInstruction
(Instruction other) ConstantInstructions are equal if the const they reference is the same, or if the const of either is unset.boolean
ConvertInstruction.equalsInstruction
(Instruction other) ConvertInstructions are equal if the types they convert between are either equal or unset.boolean
FieldInstruction.equalsInstruction
(Instruction other) FieldInstructions are equal if the field they reference is the same, or if the field of either is unset.boolean
IIncInstruction.equalsInstruction
(Instruction other) boolean
Instruction.equalsInstruction
(Instruction other) Instructions are equal if their opcodes are the same.boolean
JumpInstruction.equalsInstruction
(Instruction other) JumpInstructions are equal if they represent the same operation and the instruction they jump to is the same, or if the jump Instruction of either is unset.boolean
LoadInstruction.equalsInstruction
(Instruction other) LoadInstructions are equal if the type they reference the same type and locals index or if either is unset.boolean
LocalVariableInstruction.equalsInstruction
(Instruction other) Two local variable instructions are equal if the local index they reference is equal or if either index is 0/unset.boolean
MathInstruction.equalsInstruction
(Instruction other) MathInstructions are equal if they have the same operation and type, or the operation and type of either is unset.boolean
MethodInstruction.equalsInstruction
(Instruction other) MethodInstructions are equal if the method they reference is the same, or if the method of either is unset.boolean
MultiANewArrayInstruction.equalsInstruction
(Instruction other) Two MultiANewArray instructions are equal if they have the same type and dimensions, or if the type and dimensions of either is unset.boolean
NewArrayInstruction.equalsInstruction
(Instruction other) NewArray instructions are equal if the array type is the same, of if the array type of either is unset.boolean
RetInstruction.equalsInstruction
(Instruction other) boolean
StoreInstruction.equalsInstruction
(Instruction other) StoreInstructions are equal if the type they reference the same type and locals index or if either is unset.boolean
WideInstruction.equalsInstruction
(Instruction other) WideInstructions are equal if the instruction they augment is the same or unset.(package private) int
Code.getByteIndex
(Instruction ins) Returns the byteIndex of the given instruction.LineNumberTable.getLineNumber
(Instruction ins) Return the line number for the given instruction, or null if none.private int
Code.indexOf
(Instruction ins) Returns the number of instructions that occur before 'ins' in this code block that 'ins' is a part of.(package private) void
ClassInstruction.read
(Instruction other) (package private) void
ConstantInstruction.read
(Instruction orig) (package private) void
ConvertInstruction.read
(Instruction orig) (package private) void
FieldInstruction.read
(Instruction orig) (package private) void
IIncInstruction.read
(Instruction other) (package private) void
Instruction.read
(Instruction orig) Copy the given instruction data.(package private) void
JumpInstruction.read
(Instruction orig) (package private) void
LoadInstruction.read
(Instruction orig) (package private) void
LocalVariableInstruction.read
(Instruction orig) (package private) void
LookupSwitchInstruction.read
(Instruction orig) (package private) void
MathInstruction.read
(Instruction orig) (package private) void
MethodInstruction.read
(Instruction orig) (package private) void
MultiANewArrayInstruction.read
(Instruction orig) (package private) void
NewArrayInstruction.read
(Instruction orig) (package private) void
StoreInstruction.read
(Instruction orig) (package private) void
SwitchInstruction.read
(Instruction orig) (package private) void
TableSwitchInstruction.read
(Instruction orig) (package private) void
WideInstruction.read
(Instruction orig) boolean
LineNumberTable.removeLineNumber
(Instruction ins) Remove the line number for the given instruction.int
Code.replace
(Instruction[] templates, Instruction[] with) Equivalent to looping over each given template/replacement pair and callingCode.replace(Instruction,Instruction)
for each.int
Code.replace
(Instruction template, Instruction with) Replaces all the instructions in this code block that match the given template with the given instruction.private void
Code.CodeIterator.replaceTarget
(Instruction orig, Instruction replace) void
ExceptionHandler.replaceTarget
(Instruction oldTarget, Instruction newTarget) void
InstructionPtr.replaceTarget
(Instruction oldTarget, Instruction newTarget) Replace the given old, likely invalid, target with a new target.void
InstructionPtrStrategy.replaceTarget
(Instruction oldTarget, Instruction newTarget) void
JumpInstruction.replaceTarget
(Instruction oldTarget, Instruction newTarget) void
LineNumber.replaceTarget
(Instruction oldTarget, Instruction newTarget) void
LineNumberTable.replaceTarget
(Instruction oldTarget, Instruction newTarget) void
Local.replaceTarget
(Instruction oldTarget, Instruction newTarget) void
LocalTable.replaceTarget
(Instruction oldTarget, Instruction newTarget) void
LookupSwitchInstruction.replaceTarget
(Instruction oldTarget, Instruction newTarget) void
SwitchInstruction.replaceTarget
(Instruction oldTarget, Instruction newTarget) void
TableSwitchInstruction.replaceTarget
(Instruction oldTarget, Instruction newTarget) boolean
Code.searchBackward
(Instruction template) Find the closest previous instruction from the current iterator position that matches the given one, according to theObject.equals(java.lang.Object)
methods of the instruction types.boolean
Code.searchForward
(Instruction template) Find the next instruction from the current iterator position that matches the given one, according to theObject.equals(java.lang.Object)
methods of the instruction types.Code.set
(Instruction ins) Replaces the last iterated instruction with a copy of the given one.LookupSwitchInstruction.setCases
(int[] matches, Instruction[] targets) Set the match-jumppt pairs for this switch.SwitchInstruction.setCases
(int[] matches, Instruction[] targets) Set the match-jumppt pairs for this switch.LookupSwitchInstruction.setDefaultTarget
(Instruction ins) Synonymous withJumpInstruction.setTarget(serp.bytecode.Instruction)
.SwitchInstruction.setDefaultTarget
(Instruction ins) Synonymous withJumpInstruction.setTarget(serp.bytecode.Instruction)
.TableSwitchInstruction.setDefaultTarget
(Instruction ins) Synonymous withJumpInstruction.setTarget(serp.bytecode.Instruction)
.void
Local.setEnd
(Instruction end) Set the lastInstruction
for which this local is in scope.void
ExceptionHandler.setHandlerStart
(Instruction instruction) Set theInstruction
marking the beginning of the catch block.WideInstruction.setInstruction
(Instruction ins) Set the type of instruction this wide instruction modifies.void
LineNumber.setStart
(Instruction instruction) Set theInstruction
marking the beginning this line.void
Local.setStart
(Instruction instruction) Set theInstruction
marking the beginning this local.JumpInstruction.setTarget
(Instruction instruction) Set the instruction to jump to; the instruction must already be added to the code block.void
InstructionPtrStrategy.setTargetInstruction
(Instruction ins) Changes the target Instruction.SwitchInstruction.setTargets
(Instruction[] targets) Set the jump points for this switch.TableSwitchInstruction.setTargets
(Instruction[] targets) Set the jump points for this switch.void
ExceptionHandler.setTryEnd
(Instruction instruction) Set the Instruction at the end of the try block.void
ExceptionHandler.setTryStart
(Instruction instruction) Set theInstruction
marking the beginning of the try block.Constructors in serp.bytecode with parameters of type InstructionModifierConstructorDescription(package private)
ClassConstantInstruction
(BCClass bc, Code code, Instruction nop) InstructionPtrStrategy
(InstructionPtr pointer, Instruction target) -
Uses of Instruction in serp.bytecode.visitor
Methods in serp.bytecode.visitor with parameters of type InstructionModifier and TypeMethodDescriptionvoid
BCVisitor.enterInstruction
(Instruction obj) void
PrettyPrintVisitor.enterInstruction
(Instruction obj) void
BCVisitor.exitInstruction
(Instruction obj) void
PrettyPrintVisitor.exitInstruction
(Instruction obj)