com.ibm.wala.demandpa.flowgraph
Class SimpleDemandPointerFlowGraph.StatementVisitor

java.lang.Object
  extended by com.ibm.wala.ssa.SSAInstruction.Visitor
      extended by com.ibm.wala.demandpa.flowgraph.SimpleDemandPointerFlowGraph.StatementVisitor
All Implemented Interfaces:
SSAInstruction.IVisitor
Enclosing class:
SimpleDemandPointerFlowGraph

protected class SimpleDemandPointerFlowGraph.StatementVisitor
extends SSAInstruction.Visitor

A visitor that generates graph nodes and edges for an IR. strategy: when visiting a statement, for each use of that statement, add a graph edge from def to use. TODO: special treatment for parameter passing, etc.


Field Summary
protected  DefUse du
          Def-use information
protected  IR ir
          The governing IR
protected  CGNode node
          The node whose statements we are currently traversing
protected  SymbolTable symbolTable
          Governing symbol table
 
Constructor Summary
SimpleDemandPointerFlowGraph.StatementVisitor(CGNode node, IR ir, DefUse du)
           
 
Method Summary
 ISSABasicBlock getBasicBlock()
           
 void setBasicBlock(ISSABasicBlock block)
          The calling loop must call this in each iteration!
 void visitArrayLoad(SSAArrayLoadInstruction instruction)
           
 void visitArrayStore(SSAArrayStoreInstruction instruction)
           
 void visitCheckCast(SSACheckCastInstruction instruction)
           
 void visitGet(SSAGetInstruction instruction)
           
 void visitGetCaughtException(SSAGetCaughtExceptionInstruction instruction)
           
protected  void visitGetInternal(int lval, boolean isStatic, FieldReference field)
           
 void visitInvoke(SSAInvokeInstruction instruction)
           
 void visitLoadClass(SSALoadClassInstruction instruction)
           
 void visitNew(SSANewInstruction instruction)
           
 void visitPi(SSAPiInstruction instruction)
           
 void visitPut(SSAPutInstruction instruction)
           
 void visitPutInternal(int rval, boolean isStatic, FieldReference field)
           
 void visitReturn(SSAReturnInstruction instruction)
           
 void visitThrow(SSAThrowInstruction instruction)
           
 
Methods inherited from class com.ibm.wala.ssa.SSAInstruction.Visitor
visitArrayLength, visitBinaryOp, visitComparison, visitConditionalBranch, visitConversion, visitGoto, visitInstanceof, visitMonitor, visitPhi, visitSwitch, visitUnaryOp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

node

protected final CGNode node
The node whose statements we are currently traversing


ir

protected final IR ir
The governing IR


symbolTable

protected final SymbolTable symbolTable
Governing symbol table


du

protected final DefUse du
Def-use information

Constructor Detail

SimpleDemandPointerFlowGraph.StatementVisitor

public SimpleDemandPointerFlowGraph.StatementVisitor(CGNode node,
                                                     IR ir,
                                                     DefUse du)
Method Detail

visitArrayLoad

public void visitArrayLoad(SSAArrayLoadInstruction instruction)
Specified by:
visitArrayLoad in interface SSAInstruction.IVisitor
Overrides:
visitArrayLoad in class SSAInstruction.Visitor

visitArrayStore

public void visitArrayStore(SSAArrayStoreInstruction instruction)
Specified by:
visitArrayStore in interface SSAInstruction.IVisitor
Overrides:
visitArrayStore in class SSAInstruction.Visitor

visitCheckCast

public void visitCheckCast(SSACheckCastInstruction instruction)
Specified by:
visitCheckCast in interface SSAInstruction.IVisitor
Overrides:
visitCheckCast in class SSAInstruction.Visitor

visitReturn

public void visitReturn(SSAReturnInstruction instruction)
Specified by:
visitReturn in interface SSAInstruction.IVisitor
Overrides:
visitReturn in class SSAInstruction.Visitor

visitGet

public void visitGet(SSAGetInstruction instruction)
Specified by:
visitGet in interface SSAInstruction.IVisitor
Overrides:
visitGet in class SSAInstruction.Visitor

visitGetInternal

protected void visitGetInternal(int lval,
                                boolean isStatic,
                                FieldReference field)

visitPut

public void visitPut(SSAPutInstruction instruction)
Specified by:
visitPut in interface SSAInstruction.IVisitor
Overrides:
visitPut in class SSAInstruction.Visitor

visitPutInternal

public void visitPutInternal(int rval,
                             boolean isStatic,
                             FieldReference field)

visitInvoke

public void visitInvoke(SSAInvokeInstruction instruction)
Specified by:
visitInvoke in interface SSAInstruction.IVisitor
Overrides:
visitInvoke in class SSAInstruction.Visitor

visitNew

public void visitNew(SSANewInstruction instruction)
Specified by:
visitNew in interface SSAInstruction.IVisitor
Overrides:
visitNew in class SSAInstruction.Visitor

visitThrow

public void visitThrow(SSAThrowInstruction instruction)
Specified by:
visitThrow in interface SSAInstruction.IVisitor
Overrides:
visitThrow in class SSAInstruction.Visitor

visitGetCaughtException

public void visitGetCaughtException(SSAGetCaughtExceptionInstruction instruction)
Specified by:
visitGetCaughtException in interface SSAInstruction.IVisitor
Overrides:
visitGetCaughtException in class SSAInstruction.Visitor

visitPi

public void visitPi(SSAPiInstruction instruction)
Specified by:
visitPi in interface SSAInstruction.IVisitor
Overrides:
visitPi in class SSAInstruction.Visitor

getBasicBlock

public ISSABasicBlock getBasicBlock()

setBasicBlock

public void setBasicBlock(ISSABasicBlock block)
The calling loop must call this in each iteration!


visitLoadClass

public void visitLoadClass(SSALoadClassInstruction instruction)
Specified by:
visitLoadClass in interface SSAInstruction.IVisitor
Overrides:
visitLoadClass in class SSAInstruction.Visitor