Package com.tonic.analysis.ssa.visitor
Class AbstractIRVisitor<T>
- java.lang.Object
-
- com.tonic.analysis.ssa.visitor.AbstractIRVisitor<T>
-
-
Constructor Summary
Constructors Constructor Description AbstractIRVisitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TvisitArrayAccess(ArrayAccessInstruction arrayAccess)Visits an array element read or write.TvisitBinaryOp(BinaryOpInstruction binaryOp)Visits a two-operand arithmetic, logical, or comparison instruction.TvisitBranch(BranchInstruction branch)Visits a conditional branch and its two targets.TvisitConstant(ConstantInstruction constant)Visits a constant load.TvisitCopy(CopyInstruction copy)Visits a copy of one SSA value into another.TvisitFieldAccess(FieldAccessInstruction fieldAccess)Visits a field read or write.TvisitInvoke(InvokeInstruction invoke)Visits a method invocation.TvisitLoadLocal(LoadLocalInstruction loadLocal)Visits a read of a local variable slot.TvisitNew(NewInstruction newInstr)Visits an uninitialized object allocation, before its constructor call.TvisitNewArray(NewArrayInstruction newArray)Visits an array allocation.TvisitPhi(PhiInstruction phi)Visits a phi that merges values arriving from several predecessors.TvisitReturn(ReturnInstruction returnInstr)Visits a return, with or without a value.TvisitSimple(SimpleInstruction simple)Visits a single-operand instruction: arraylength, a monitor op, throw, goto, or catch.TvisitStoreLocal(StoreLocalInstruction storeLocal)Visits a write to a local variable slot.TvisitSwitch(SwitchInstruction switchInstr)Visits a multi-way branch on an int key.TvisitTypeCheck(TypeCheckInstruction typeCheck)Visits an instanceof test or a checkcast.TvisitUnaryOp(UnaryOpInstruction unaryOp)Visits a one-operand instruction such as a negation or a numeric conversion.
-
-
-
Method Detail
-
visitPhi
public T visitPhi(PhiInstruction phi)
Description copied from interface:IRVisitorVisits a phi that merges values arriving from several predecessors.
-
visitBinaryOp
public T visitBinaryOp(BinaryOpInstruction binaryOp)
Description copied from interface:IRVisitorVisits a two-operand arithmetic, logical, or comparison instruction.- Specified by:
visitBinaryOpin interfaceIRVisitor<T>- Parameters:
binaryOp- the instruction- Returns:
- the visitor result
-
visitUnaryOp
public T visitUnaryOp(UnaryOpInstruction unaryOp)
Description copied from interface:IRVisitorVisits a one-operand instruction such as a negation or a numeric conversion.- Specified by:
visitUnaryOpin interfaceIRVisitor<T>- Parameters:
unaryOp- the instruction- Returns:
- the visitor result
-
visitBranch
public T visitBranch(BranchInstruction branch)
Description copied from interface:IRVisitorVisits a conditional branch and its two targets.- Specified by:
visitBranchin interfaceIRVisitor<T>- Parameters:
branch- the instruction- Returns:
- the visitor result
-
visitSwitch
public T visitSwitch(SwitchInstruction switchInstr)
Description copied from interface:IRVisitorVisits a multi-way branch on an int key.- Specified by:
visitSwitchin interfaceIRVisitor<T>- Parameters:
switchInstr- the instruction- Returns:
- the visitor result
-
visitReturn
public T visitReturn(ReturnInstruction returnInstr)
Description copied from interface:IRVisitorVisits a return, with or without a value.- Specified by:
visitReturnin interfaceIRVisitor<T>- Parameters:
returnInstr- the instruction- Returns:
- the visitor result
-
visitLoadLocal
public T visitLoadLocal(LoadLocalInstruction loadLocal)
Description copied from interface:IRVisitorVisits a read of a local variable slot.- Specified by:
visitLoadLocalin interfaceIRVisitor<T>- Parameters:
loadLocal- the instruction- Returns:
- the visitor result
-
visitStoreLocal
public T visitStoreLocal(StoreLocalInstruction storeLocal)
Description copied from interface:IRVisitorVisits a write to a local variable slot.- Specified by:
visitStoreLocalin interfaceIRVisitor<T>- Parameters:
storeLocal- the instruction- Returns:
- the visitor result
-
visitInvoke
public T visitInvoke(InvokeInstruction invoke)
Description copied from interface:IRVisitorVisits a method invocation.- Specified by:
visitInvokein interfaceIRVisitor<T>- Parameters:
invoke- the instruction- Returns:
- the visitor result
-
visitNew
public T visitNew(NewInstruction newInstr)
Description copied from interface:IRVisitorVisits an uninitialized object allocation, before its constructor call.
-
visitNewArray
public T visitNewArray(NewArrayInstruction newArray)
Description copied from interface:IRVisitorVisits an array allocation.- Specified by:
visitNewArrayin interfaceIRVisitor<T>- Parameters:
newArray- the instruction- Returns:
- the visitor result
-
visitCopy
public T visitCopy(CopyInstruction copy)
Description copied from interface:IRVisitorVisits a copy of one SSA value into another.
-
visitConstant
public T visitConstant(ConstantInstruction constant)
Description copied from interface:IRVisitorVisits a constant load.- Specified by:
visitConstantin interfaceIRVisitor<T>- Parameters:
constant- the instruction- Returns:
- the visitor result
-
visitFieldAccess
public T visitFieldAccess(FieldAccessInstruction fieldAccess)
Description copied from interface:IRVisitorVisits a field read or write.- Specified by:
visitFieldAccessin interfaceIRVisitor<T>- Parameters:
fieldAccess- the instruction- Returns:
- the visitor result
-
visitArrayAccess
public T visitArrayAccess(ArrayAccessInstruction arrayAccess)
Description copied from interface:IRVisitorVisits an array element read or write.- Specified by:
visitArrayAccessin interfaceIRVisitor<T>- Parameters:
arrayAccess- the instruction- Returns:
- the visitor result
-
visitTypeCheck
public T visitTypeCheck(TypeCheckInstruction typeCheck)
Description copied from interface:IRVisitorVisits an instanceof test or a checkcast.- Specified by:
visitTypeCheckin interfaceIRVisitor<T>- Parameters:
typeCheck- the instruction- Returns:
- the visitor result
-
visitSimple
public T visitSimple(SimpleInstruction simple)
Description copied from interface:IRVisitorVisits a single-operand instruction: arraylength, a monitor op, throw, goto, or catch.- Specified by:
visitSimplein interfaceIRVisitor<T>- Parameters:
simple- the instruction- Returns:
- the visitor result
-
-