public abstract class AbstractRootMethod extends SyntheticMethod
FakeRootClass
IMethod.SourcePosition
ContextItem.Value<T>
Modifier and Type | Field and Description |
---|---|
protected IAnalysisCacheView |
cache |
IClassHierarchy |
cha |
protected SSAInstructionFactory |
insts |
int |
nextLocal
The number of the next local value number available for the fake root method.
|
ArrayList<SSAInstruction> |
statements |
declaringClass, NO_STATEMENTS, resolvedMethod
Constructor and Description |
---|
AbstractRootMethod(MethodReference method,
IClassHierarchy cha,
AnalysisOptions options,
IAnalysisCacheView cache) |
AbstractRootMethod(MethodReference method,
IClass declaringClass,
IClassHierarchy cha,
AnalysisOptions options,
IAnalysisCacheView 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) |
SSAAbstractInvokeInstruction |
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) |
int |
getValueNumberForByteConstant(byte c) |
int |
getValueNumberForCharConstant(char c) |
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, isWalaSynthetic, makeControlFlowGraph, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getNumberOfDefaultParameters
public final ArrayList<SSAInstruction> statements
public int nextLocal
public final IClassHierarchy cha
protected final IAnalysisCacheView cache
protected final SSAInstructionFactory insts
public AbstractRootMethod(MethodReference method, IClass declaringClass, IClassHierarchy cha, AnalysisOptions options, IAnalysisCacheView cache)
public AbstractRootMethod(MethodReference method, IClassHierarchy cha, AnalysisOptions options, IAnalysisCacheView 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 SSAAbstractInvokeInstruction 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)
public int getValueNumberForIntConstant(int c)
public int getValueNumberForByteConstant(byte c)
public 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()
Copyright © 2019. All rights reserved.