com.ibm.wala.ssa
Class SSAAbstractInvokeInstruction

java.lang.Object
  extended by com.ibm.wala.ssa.SSAInstruction
      extended by com.ibm.wala.ssa.SSAAbstractInvokeInstruction
All Implemented Interfaces:
IInstruction, IInvokeInstruction
Direct Known Subclasses:
AbstractLexicalInvoke, ReflectiveInvokeInstruction, SSAInvokeInstruction

public abstract class SSAAbstractInvokeInstruction
extends SSAInstruction
implements IInvokeInstruction


Nested Class Summary
 
Nested classes/interfaces inherited from class com.ibm.wala.ssa.SSAInstruction
SSAInstruction.IVisitor, SSAInstruction.Visitor
 
Nested classes/interfaces inherited from interface com.ibm.wala.shrikeBT.IInvokeInstruction
IInvokeInstruction.Dispatch, IInvokeInstruction.IDispatch
 
Field Summary
protected  int exception
          The value number which represents the exception object which the call may throw.
protected  int result
          The value number of the return value of this call, or -1 if the method returns void
protected  CallSiteReference site
          The call site, containing the program counter location and the method being called.
 
Constructor Summary
protected SSAAbstractInvokeInstruction(int result, int exception, CallSiteReference site)
           
 
Method Summary
 CallSiteReference getCallSite()
           
 TypeReference getDeclaredResultType()
          Method getDeclaredResultType.
 MethodReference getDeclaredTarget()
           
 int getDef()
           
 int getDef(int i)
           
 int getException()
           
 IInvokeInstruction.IDispatch getInvocationCode()
           
 int getNumberOfDefs()
           
abstract  int getNumberOfParameters()
           
 int getProgramCounter()
           
 int getReceiver()
           
 CallSiteReference getSite()
           
 boolean hasDef()
          Does this instruction define a normal value, as distinct from a set of exceptions possibly thrown by it (e.g.
 boolean isDispatch()
           
 boolean isFallThrough()
           
 boolean isPEI()
          PEI == "Potentially excepting instruction"
 boolean isSpecial()
           
 boolean isStatic()
           
 java.lang.String toString(SymbolTable symbolTable, ValueDecorator d)
          Method toString.
 
Methods inherited from class com.ibm.wala.ssa.SSAInstruction
copyForSSA, equals, getExceptionTypes, getNumberOfUses, getUse, getValueString, hashCode, toString, visit
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

result

protected final int result
The value number of the return value of this call, or -1 if the method returns void


exception

protected final int exception
The value number which represents the exception object which the call may throw.


site

protected final CallSiteReference site
The call site, containing the program counter location and the method being called.

Constructor Detail

SSAAbstractInvokeInstruction

protected SSAAbstractInvokeInstruction(int result,
                                       int exception,
                                       CallSiteReference site)
Method Detail

getDef

public int getDef()
Overrides:
getDef in class SSAInstruction

hasDef

public boolean hasDef()
Description copied from class: SSAInstruction
Does this instruction define a normal value, as distinct from a set of exceptions possibly thrown by it (e.g. for invoke instructions).

Overrides:
hasDef in class SSAInstruction
Returns:
true if the instruction does define a proper value.

getCallSite

public CallSiteReference getCallSite()

getSite

public CallSiteReference getSite()

isStatic

public boolean isStatic()

isDispatch

public boolean isDispatch()

isSpecial

public boolean isSpecial()

getReceiver

public int getReceiver()
Returns:
the value number of the receiver of a virtual call

getProgramCounter

public int getProgramCounter()

getDef

public int getDef(int i)
Overrides:
getDef in class SSAInstruction

getException

public int getException()

getNumberOfDefs

public int getNumberOfDefs()
Overrides:
getNumberOfDefs in class SSAInstruction

getNumberOfParameters

public abstract int getNumberOfParameters()

getDeclaredResultType

public TypeReference getDeclaredResultType()
Method getDeclaredResultType. TODO: push this logic into shrike.

Returns:
TypeReference

getDeclaredTarget

public MethodReference getDeclaredTarget()
See Also:
CallSiteReference.getDeclaredTarget()

getInvocationCode

public IInvokeInstruction.IDispatch getInvocationCode()
Specified by:
getInvocationCode in interface IInvokeInstruction
Returns:
one of BytecodeConstants.INVOKE[SPECIAL|VIRTUAL|STATIC|INTERFACE]
See Also:
CallSiteReference.getInvocationCode()

isPEI

public boolean isPEI()
Description copied from interface: IInstruction
PEI == "Potentially excepting instruction"

Specified by:
isPEI in interface IInstruction
Overrides:
isPEI in class SSAInstruction
Returns:
true iff this instruction may throw an exception.

isFallThrough

public boolean isFallThrough()
Specified by:
isFallThrough in class SSAInstruction
Returns:
true iff this instruction may fall through to the next

toString

public java.lang.String toString(SymbolTable symbolTable,
                                 ValueDecorator d)
Description copied from class: SSAInstruction
Method toString.

Specified by:
toString in class SSAInstruction
Returns:
Object