Package com.tonic.analysis.ssa.visitor
Class AbstractBlockVisitor
- java.lang.Object
-
- com.tonic.analysis.ssa.visitor.AbstractBlockVisitor
-
- All Implemented Interfaces:
Visitor<MethodEntry>
public abstract class AbstractBlockVisitor extends Object implements Visitor<MethodEntry>
Abstract visitor for processing SSA-form IR blocks and instructions.
-
-
Constructor Summary
Constructors Constructor Description AbstractBlockVisitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IRMethodgetIRMethod()Gets the current IR method being visited.MethodEntrygetMethod()Gets the source method entry.voidprocess(MethodEntry method)Processes the given method by lifting to SSA and visiting its blocks and instructions.voidvisitBlock(IRBlock block)Visits an IR block.voidvisitInstruction(IRInstruction instruction)Visits an IR instruction.voidvisitPhi(PhiInstruction phi)Visits a phi instruction.
-
-
-
Method Detail
-
process
public void process(MethodEntry method) throws IOException
Processes the given method by lifting to SSA and visiting its blocks and instructions.- Specified by:
processin interfaceVisitor<MethodEntry>- Parameters:
method- the method entry to process- Throws:
IOException- if an I/O error occurs during processing
-
visitBlock
public void visitBlock(IRBlock block)
Visits an IR block.- Parameters:
block- the block to visit
-
visitPhi
public void visitPhi(PhiInstruction phi)
Visits a phi instruction.- Parameters:
phi- the phi instruction to visit
-
visitInstruction
public void visitInstruction(IRInstruction instruction)
Visits an IR instruction.- Parameters:
instruction- the instruction to visit
-
getIRMethod
public IRMethod getIRMethod()
Gets the current IR method being visited.- Returns:
- the IR method
-
getMethod
public MethodEntry getMethod()
Gets the source method entry.- Returns:
- the method entry
-
-