|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object joeq.Compiler.Quad.QuadVisitor.EmptyVisitor joeq.Compiler.Analysis.FlowInsensitive.MethodSummary.BuildMethodSummary
public static final class MethodSummary.BuildMethodSummary
Visitor class to build an intramethod summary.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface joeq.Compiler.Quad.QuadVisitor |
---|
QuadVisitor.AllQuadVisitor, QuadVisitor.EmptyVisitor |
Field Summary | |
---|---|
protected BasicBlock |
bb
The current basic block. |
protected HashMap |
callToRVN
Map from a method call to its ReturnValueNode. |
protected HashMap |
callToTEN
Map from a method call to its ThrownExceptionNode. |
protected LinkedHashMap |
castMap
Map from a (Node,Quad) pair to the node it's cast to. |
protected LinkedHashSet |
castPredecessors
Set of nodes that lead to a cast. |
protected boolean |
change
Change bit for worklist iteration. |
static boolean |
INSIDE_EDGES
|
protected jq_Method |
method
The method that we are building a summary for. |
protected Set |
methodCalls
The set of method calls made. |
protected MethodSummary.GlobalNode |
my_global
The global node. |
protected HashMap |
nodeCache
Factory for nodes. |
protected MethodSummary.ParamNode[] |
param_nodes
The parameter nodes. |
protected Set |
passedAsParameter
The set of nodes that were ever passed as a parameter, or returned/thrown from a call site. |
static boolean |
PATCH_UP_FAKE
|
protected Set |
returned
The set of returned and thrown nodes. |
protected RegisterFactory |
rf
The register factory. |
protected MethodSummary.State |
s
The current state. |
protected MethodSummary.State[] |
start_states
The start states of the iteration. |
protected Map |
sync_ops
Map from sync ops to their nodes. |
protected Set |
thrown
The set of returned and thrown nodes. |
Constructor Summary | |
---|---|
MethodSummary.BuildMethodSummary(ControlFlowGraph cfg)
Build a summary for the given method. |
Method Summary | |
---|---|
Object |
getRegister(RegisterFactory.Register r)
Get the node or set of nodes in the given register in the current state. |
MethodSummary |
getSummary()
Returns the summary. |
protected void |
heapLoad(ProgramLocation obj,
RegisterFactory.Register dest_r,
MethodSummary.Node base_n,
jq_Field f)
Abstractly perform a heap load operation corresponding to quad 'obj' with the given destination register, base and field. |
protected void |
heapLoad(ProgramLocation obj,
RegisterFactory.Register dest_r,
RegisterFactory.Register base_r,
jq_Field f)
Abstractly perform a heap load operation corresponding to quad 'obj' with the given destination register, base register and field. |
protected void |
heapLoad(ProgramLocation obj,
RegisterFactory.Register dest_r,
Set base_s,
jq_Field f)
Abstractly perform a heap load operation corresponding to quad 'obj' with the given destination register, bases and field. |
protected void |
heapLoad(Set result,
MethodSummary.Node base,
jq_Field f,
MethodSummary.FieldNode fn)
Abstractly perform a heap load operation on the given base and field with the given field node, putting the result in the given set. |
protected void |
heapStore(MethodSummary.Node base,
MethodSummary.Node src,
jq_Field f)
Abstractly perform a heap store operation of the given source node on the given base node and field. |
protected void |
heapStore(MethodSummary.Node base,
Object src,
jq_Field f)
|
protected void |
heapStore(MethodSummary.Node base,
Set src,
jq_Field f)
Abstractly perform a heap store operation of the given source nodes on the given base node and field. |
protected void |
heapStore(Object base,
Object src,
jq_Field f)
Abstractly perform a heap store operation of the given source node on the nodes in the given register in the current state and the given field. |
protected void |
mergeWith(BasicBlock succ)
Merge the current state into the start state for the given basic block. |
protected void |
mergeWith(ExceptionHandler eh)
Merge the current state into the start state for the given basic block. |
protected void |
mergeWithJSR(BasicBlock succ,
MethodSummary.State s2,
boolean[] changedLocals)
|
protected void |
monitorOp(Quad q,
RegisterFactory.Register r)
|
protected void |
monitorOp(Quad q,
Set s)
|
protected void |
setLocal(int i,
MethodSummary.Node n)
Set the given local in the current state to point to the given node. |
protected void |
setRegister(RegisterFactory.Register r,
MethodSummary.Node n)
Set the given register in the current state to point to the given node. |
protected void |
setRegister(RegisterFactory.Register r,
Object n)
Set the given register in the current state to point to the given node or set of nodes. |
void |
updateLocation(BasicBlock bb,
Quad q)
Calculate the register set up to a given point. |
void |
visitALoad(Quad obj)
Visit an array load instruction. |
void |
visitAStore(Quad obj)
Visit an array store instruction. |
void |
visitBinary(Quad obj)
A binary operation instruction. |
void |
visitCheckCast(Quad obj)
Visit a type cast check instruction. |
void |
visitExceptionThrower(Quad obj)
A potentially excepting instruction.. |
void |
visitGetfield(Quad obj)
Visit a get instance field instruction. |
void |
visitGetstatic(Quad obj)
Visit a get static field instruction. |
void |
visitInstanceOf(Quad obj)
Visit a type instance of instruction. |
void |
visitInvoke(Quad obj)
Visit an invoke instruction. |
void |
visitJsr(Quad obj)
A jump local subroutine instruction. |
void |
visitMonitor(Quad obj)
Visit a register move instruction. |
void |
visitMove(Quad obj)
Visit a register move instruction. |
void |
visitNew(Quad obj)
Visit an object allocation instruction. |
void |
visitNewArray(Quad obj)
Visit an array allocation instruction. |
void |
visitPhi(Quad obj)
A phi instruction. |
void |
visitPutfield(Quad obj)
Visit a put instance field instruction. |
void |
visitPutstatic(Quad obj)
Visit a put static field instruction. |
void |
visitReturn(Quad obj)
Visit a return/throw instruction. |
void |
visitSpecial(Quad obj)
A special instruction. |
void |
visitUnary(Quad obj)
A unary operation instruction. |
Methods inherited from class joeq.Compiler.Quad.QuadVisitor.EmptyVisitor |
---|
visitALength, visitAllocation, visitArray, visitBoundsCheck, visitBranch, visitCheck, visitCondBranch, visitGoto, visitInstanceField, visitIntIfCmp, visitLoad, visitLookupSwitch, visitMemLoad, visitMemStore, visitNullCheck, visitQuad, visitRet, visitStaticField, visitStore, visitStoreCheck, visitTableSwitch, visitTypeCheck, visitZeroCheck |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final jq_Method method
protected final RegisterFactory rf
protected final MethodSummary.ParamNode[] param_nodes
protected final MethodSummary.GlobalNode my_global
protected final MethodSummary.State[] start_states
protected final Set returned
protected final Set thrown
protected final Set methodCalls
protected final HashMap callToRVN
protected final HashMap callToTEN
protected final LinkedHashMap castMap
protected final LinkedHashSet castPredecessors
protected final Set passedAsParameter
protected BasicBlock bb
protected MethodSummary.State s
protected boolean change
protected final Map sync_ops
protected final HashMap nodeCache
public static final boolean INSIDE_EDGES
public static boolean PATCH_UP_FAKE
Constructor Detail |
---|
public MethodSummary.BuildMethodSummary(ControlFlowGraph cfg)
Method Detail |
---|
public MethodSummary getSummary()
protected void setLocal(int i, MethodSummary.Node n)
protected void setRegister(RegisterFactory.Register r, MethodSummary.Node n)
protected void setRegister(RegisterFactory.Register r, Object n)
public Object getRegister(RegisterFactory.Register r)
public void updateLocation(BasicBlock bb, Quad q)
protected void mergeWith(BasicBlock succ)
protected void mergeWithJSR(BasicBlock succ, MethodSummary.State s2, boolean[] changedLocals)
protected void mergeWith(ExceptionHandler eh)
protected void heapLoad(Set result, MethodSummary.Node base, jq_Field f, MethodSummary.FieldNode fn)
protected void heapLoad(ProgramLocation obj, RegisterFactory.Register dest_r, Set base_s, jq_Field f)
protected void heapLoad(ProgramLocation obj, RegisterFactory.Register dest_r, MethodSummary.Node base_n, jq_Field f)
protected void heapLoad(ProgramLocation obj, RegisterFactory.Register dest_r, RegisterFactory.Register base_r, jq_Field f)
protected void heapStore(MethodSummary.Node base, MethodSummary.Node src, jq_Field f)
protected void heapStore(MethodSummary.Node base, Set src, jq_Field f)
protected void heapStore(MethodSummary.Node base, Object src, jq_Field f)
protected void heapStore(Object base, Object src, jq_Field f)
protected void monitorOp(Quad q, RegisterFactory.Register r)
protected void monitorOp(Quad q, Set s)
public void visitALoad(Quad obj)
visitALoad
in interface QuadVisitor
visitALoad
in class QuadVisitor.EmptyVisitor
public void visitAStore(Quad obj)
visitAStore
in interface QuadVisitor
visitAStore
in class QuadVisitor.EmptyVisitor
public void visitBinary(Quad obj)
QuadVisitor.EmptyVisitor
visitBinary
in interface QuadVisitor
visitBinary
in class QuadVisitor.EmptyVisitor
public void visitCheckCast(Quad obj)
visitCheckCast
in interface QuadVisitor
visitCheckCast
in class QuadVisitor.EmptyVisitor
public void visitGetfield(Quad obj)
visitGetfield
in interface QuadVisitor
visitGetfield
in class QuadVisitor.EmptyVisitor
public void visitGetstatic(Quad obj)
visitGetstatic
in interface QuadVisitor
visitGetstatic
in class QuadVisitor.EmptyVisitor
public void visitInstanceOf(Quad obj)
visitInstanceOf
in interface QuadVisitor
visitInstanceOf
in class QuadVisitor.EmptyVisitor
public void visitInvoke(Quad obj)
visitInvoke
in interface QuadVisitor
visitInvoke
in class QuadVisitor.EmptyVisitor
public void visitJsr(Quad obj)
QuadVisitor.EmptyVisitor
visitJsr
in interface QuadVisitor
visitJsr
in class QuadVisitor.EmptyVisitor
QuadVisitor.visitJsr(joeq.Compiler.Quad.Quad)
public void visitMonitor(Quad obj)
visitMonitor
in interface QuadVisitor
visitMonitor
in class QuadVisitor.EmptyVisitor
public void visitMove(Quad obj)
visitMove
in interface QuadVisitor
visitMove
in class QuadVisitor.EmptyVisitor
public void visitPhi(Quad obj)
QuadVisitor.EmptyVisitor
visitPhi
in interface QuadVisitor
visitPhi
in class QuadVisitor.EmptyVisitor
public void visitNew(Quad obj)
visitNew
in interface QuadVisitor
visitNew
in class QuadVisitor.EmptyVisitor
public void visitNewArray(Quad obj)
visitNewArray
in interface QuadVisitor
visitNewArray
in class QuadVisitor.EmptyVisitor
public void visitPutfield(Quad obj)
visitPutfield
in interface QuadVisitor
visitPutfield
in class QuadVisitor.EmptyVisitor
public void visitPutstatic(Quad obj)
visitPutstatic
in interface QuadVisitor
visitPutstatic
in class QuadVisitor.EmptyVisitor
public void visitReturn(Quad obj)
visitReturn
in interface QuadVisitor
visitReturn
in class QuadVisitor.EmptyVisitor
public void visitSpecial(Quad obj)
QuadVisitor.EmptyVisitor
visitSpecial
in interface QuadVisitor
visitSpecial
in class QuadVisitor.EmptyVisitor
public void visitUnary(Quad obj)
QuadVisitor.EmptyVisitor
visitUnary
in interface QuadVisitor
visitUnary
in class QuadVisitor.EmptyVisitor
public void visitExceptionThrower(Quad obj)
QuadVisitor.EmptyVisitor
visitExceptionThrower
in interface QuadVisitor
visitExceptionThrower
in class QuadVisitor.EmptyVisitor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |