public abstract class AbstractRootMethod extends SyntheticMethod
FakeRootClass
IMethod.SourcePosition
ContextItem.Value<T>
Modifier and Type | Field and Description |
---|---|
protected AnalysisCache |
cache |
protected IClassHierarchy |
cha |
protected SSAInstructionFactory |
insts |
protected int |
nextLocal
The number of the next local value number available for the fake root method.
|
protected ArrayList<SSAInstruction> |
statements |
declaringClass, NO_STATEMENTS, resolvedMethod
Constructor and Description |
---|
AbstractRootMethod(MethodReference method,
IClassHierarchy cha,
AnalysisOptions options,
AnalysisCache cache) |
AbstractRootMethod(MethodReference method,
IClass declaringClass,
IClassHierarchy cha,
AnalysisOptions options,
AnalysisCache cache) |
Modifier and Type | Method and Description |
---|---|
SSANewInstruction |
add1DArrayAllocation(TypeReference T,
int length)
Add a New statement of the given array type and length
|
SSANewInstruction |
addAllocation(TypeReference T)
Add a New statement of the given type
Side effect: adds call to default constructor of given type if one exists.
|
SSANewInstruction |
addAllocationWithoutCtor(TypeReference T)
Add a New statement of the given type
|
int |
addCheckcast(TypeReference[] types,
int rv,
boolean isPEI) |
int |
addGetArrayField(TypeReference elementType,
int baseObject,
int indexValue) |
int |
addGetInstance(FieldReference ref,
int object) |
int |
addGetStatic(FieldReference ref) |
SSAInvokeInstruction |
addInvocation(int[] params,
CallSiteReference site) |
int |
addLocal() |
int |
addPhi(int[] values) |
SSAReturnInstruction |
addReturn(int vn,
boolean isPrimitive)
Add a return statement
|
void |
addSetArrayField(TypeReference elementType,
int baseObject,
int indexValue,
int value) |
void |
addSetInstance(FieldReference ref,
int baseObject,
int value) |
void |
addSetStatic(FieldReference ref,
int value) |
RTAContextInterpreter |
getInterpreter() |
SSAInstruction[] |
getStatements(SSAOptions options) |
protected int |
getValueNumberForByteConstant(byte c) |
protected int |
getValueNumberForCharConstant(char c) |
protected int |
getValueNumberForIntConstant(int c) |
IR |
makeIR(Context context,
SSAOptions options)
Most subclasses should override this.
|
equals, getAnnotations, getBytecodeStream, getClassHierarchy, getDeclaredExceptions, getDeclaringClass, getDescriptor, getLineNumber, getLocalVariableName, getMaxLocals, getMaxStackHeight, getName, getNumberOfParameters, getParameterSourcePosition, getParameterType, getPoison, getPoisonLevel, getReference, getReturnType, getSelector, getSignature, getSourcePosition, getStatements, hasExceptionHandler, hashCode, hasLocalVariableTable, hasPoison, isAbstract, isBridge, isClinit, isFactoryMethod, isFinal, isInit, isNative, isPrivate, isProtected, isPublic, isStatic, isSynchronized, isSynthetic, makeControlFlowGraph, toString
protected final ArrayList<SSAInstruction> statements
protected int nextLocal
protected final IClassHierarchy cha
protected final AnalysisCache cache
protected final SSAInstructionFactory insts
public AbstractRootMethod(MethodReference method, IClass declaringClass, IClassHierarchy cha, AnalysisOptions options, AnalysisCache cache)
public AbstractRootMethod(MethodReference method, IClassHierarchy cha, AnalysisOptions options, AnalysisCache cache)
public SSAInstruction[] getStatements(SSAOptions options)
getStatements
in class SyntheticMethod
public IR makeIR(Context context, SSAOptions options)
SyntheticMethod
makeIR
in class SyntheticMethod
context
- TODOoptions
- options governing IR conversionpublic int addLocal()
public SSAInvokeInstruction addInvocation(int[] params, CallSiteReference site)
IllegalArgumentException
- if site is nullpublic SSAReturnInstruction addReturn(int vn, boolean isPrimitive)
public SSANewInstruction addAllocation(TypeReference T)
IllegalArgumentException
- if T is nullpublic SSANewInstruction add1DArrayAllocation(TypeReference T, int length)
public SSANewInstruction addAllocationWithoutCtor(TypeReference T)
protected int getValueNumberForIntConstant(int c)
protected int getValueNumberForByteConstant(byte c)
protected int getValueNumberForCharConstant(char c)
public int addPhi(int[] values)
public int addGetInstance(FieldReference ref, int object)
public int addGetStatic(FieldReference ref)
public int addCheckcast(TypeReference[] types, int rv, boolean isPEI)
public void addSetInstance(FieldReference ref, int baseObject, int value)
public void addSetStatic(FieldReference ref, int value)
public void addSetArrayField(TypeReference elementType, int baseObject, int indexValue, int value)
public int addGetArrayField(TypeReference elementType, int baseObject, int indexValue)
public RTAContextInterpreter getInterpreter()