|
||||||||||
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.Primitive.PrimitiveMethodSummary.BuildMethodSummary
public static final class PrimitiveMethodSummary.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 PrimitiveMethodSummary.GlobalNode |
my_global
The global node. |
protected HashMap |
nodeCache
Factory for nodes. |
protected PrimitiveMethodSummary.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. |
protected Set |
returned
The set of returned and thrown nodes. |
protected RegisterFactory |
rf
The register factory. |
protected PrimitiveMethodSummary.State |
s
The current state. |
protected PrimitiveMethodSummary.State[] |
start_states
The start states of the iteration. |
protected Set |
string_nodes
|
protected Map |
sync_ops
Map from sync ops to their nodes. |
protected Set |
thrown
The set of returned and thrown nodes. |
Constructor Summary | |
---|---|
PrimitiveMethodSummary.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. |
PrimitiveMethodSummary |
getSummary()
Returns the summary. |
protected void |
heapLoad(ProgramLocation obj,
RegisterFactory.Register dest_r,
PrimitiveMethodSummary.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,
PrimitiveMethodSummary.Node base,
jq_Field f,
PrimitiveMethodSummary.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(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 |
heapStore(PrimitiveMethodSummary.Node base,
Object src,
jq_Field f)
|
protected void |
heapStore(PrimitiveMethodSummary.Node base,
PrimitiveMethodSummary.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(PrimitiveMethodSummary.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 |
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,
PrimitiveMethodSummary.State s2,
boolean[] changedLocals)
|
protected void |
monitorOp(Quad q,
RegisterFactory.Register r)
|
protected void |
monitorOp(Quad q,
Set s)
|
protected void |
setLocal(int i,
PrimitiveMethodSummary.Node n)
Set the given local 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. |
protected void |
setRegister(RegisterFactory.Register r,
PrimitiveMethodSummary.Node n)
Set the given register in the current state to point to the given node. |
void |
updateLocation(BasicBlock bb,
Quad q)
Calculate the register set up to a given point. |
void |
visitALength(Quad obj)
An array length instruction. |
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 |
visitIntIfCmp(Quad obj)
A compare and branch 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 |
---|
visitAllocation, visitArray, visitBoundsCheck, visitBranch, visitCheck, visitCondBranch, visitGoto, visitInstanceField, 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 PrimitiveMethodSummary.ParamNode[] param_nodes
protected final PrimitiveMethodSummary.GlobalNode my_global
protected final PrimitiveMethodSummary.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 PrimitiveMethodSummary.State s
protected boolean change
protected final Map sync_ops
protected Set string_nodes
protected final HashMap nodeCache
public static final boolean INSIDE_EDGES
Constructor Detail |
---|
public PrimitiveMethodSummary.BuildMethodSummary(ControlFlowGraph cfg)
Method Detail |
---|
public PrimitiveMethodSummary getSummary()
protected void setLocal(int i, PrimitiveMethodSummary.Node n)
protected void setRegister(RegisterFactory.Register r, PrimitiveMethodSummary.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, PrimitiveMethodSummary.State s2, boolean[] changedLocals)
protected void mergeWith(ExceptionHandler eh)
protected void heapLoad(Set result, PrimitiveMethodSummary.Node base, jq_Field f, PrimitiveMethodSummary.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, PrimitiveMethodSummary.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(PrimitiveMethodSummary.Node base, PrimitiveMethodSummary.Node src, jq_Field f)
protected void heapStore(PrimitiveMethodSummary.Node base, Set src, jq_Field f)
protected void heapStore(PrimitiveMethodSummary.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 visitIntIfCmp(Quad obj)
QuadVisitor.EmptyVisitor
visitIntIfCmp
in interface QuadVisitor
visitIntIfCmp
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 visitALength(Quad obj)
QuadVisitor.EmptyVisitor
visitALength
in interface QuadVisitor
visitALength
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 |