Class AbstractRootMethod
java.lang.Object
com.ibm.wala.classLoader.SyntheticMethod
com.ibm.wala.ipa.callgraph.impl.AbstractRootMethod
- All Implemented Interfaces:
IMember
,IMethod
,ContextItem
,IClassHierarchyDweller
- Direct Known Subclasses:
AstCallGraph.AstFakeRoot
,FakeRootMethod
,FakeWorldClinitMethod
A synthetic method from the
FakeRootClass
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.ibm.wala.ipa.callgraph.ContextItem
ContextItem.Value<T>
Nested classes/interfaces inherited from interface com.ibm.wala.classLoader.IMethod
IMethod.SourcePosition
-
Field Summary
Modifier and TypeFieldDescriptionprotected final IAnalysisCacheView
final IClassHierarchy
protected final SSAInstructionFactory
int
The number of the next local value number available for the fake root method.final ArrayList
<SSAInstruction> Fields inherited from class com.ibm.wala.classLoader.SyntheticMethod
declaringClass, NO_STATEMENTS, resolvedMethod
-
Constructor Summary
ConstructorDescriptionAbstractRootMethod
(MethodReference method, IClass declaringClass, IClassHierarchy cha, AnalysisOptions options, IAnalysisCacheView cache) AbstractRootMethod
(MethodReference method, IClassHierarchy cha, AnalysisOptions options, IAnalysisCacheView cache) -
Method Summary
Modifier and TypeMethodDescriptionadd1DArrayAllocation
(TypeReference T, int length) Add a New statement of the given array type and lengthAdd a New statement of the given typeAdd a New statement of the given typeint
addCheckcast
(TypeReference[] types, int rv, boolean isPEI) int
addGetArrayField
(TypeReference elementType, int baseObject, int indexValue) int
addGetInstance
(FieldReference ref, int object) int
addInvocation
(int[] params, CallSiteReference site) int
addLocal()
int
addPhi
(int[] values) addReturn
(int vn, boolean isPrimitive) Add a return statementvoid
addSetArrayField
(TypeReference elementType, int baseObject, int indexValue, int value) void
addSetInstance
(FieldReference ref, int baseObject, int value) void
addSetStatic
(FieldReference ref, int value) getStatements
(SSAOptions options) int
getValueNumberForByteConstant
(byte c) int
getValueNumberForCharConstant
(char c) int
getValueNumberForIntConstant
(int c) makeIR
(Context context, SSAOptions options) Most subclasses should override this.Methods inherited from class com.ibm.wala.classLoader.SyntheticMethod
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, isAnnotation, isBridge, isClinit, isEnum, isFactoryMethod, isFinal, isInit, isModule, isNative, isPrivate, isProtected, isPublic, isStatic, isSynchronized, isSynthetic, isWalaSynthetic, makeControlFlowGraph, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.ibm.wala.classLoader.IMethod
getNumberOfDefaultParameters
-
Field Details
-
statements
-
nextLocal
public int nextLocalThe number of the next local value number available for the fake root method. Note that we reserve value number 1 to represent the value "any exception caught by the root method" -
cha
-
cache
-
insts
-
-
Constructor Details
-
AbstractRootMethod
public AbstractRootMethod(MethodReference method, IClass declaringClass, IClassHierarchy cha, AnalysisOptions options, IAnalysisCacheView cache) -
AbstractRootMethod
public AbstractRootMethod(MethodReference method, IClassHierarchy cha, AnalysisOptions options, IAnalysisCacheView cache)
-
-
Method Details
-
getStatements
- Overrides:
getStatements
in classSyntheticMethod
- See Also:
-
makeIR
Description copied from class:SyntheticMethod
Most subclasses should override this.- Overrides:
makeIR
in classSyntheticMethod
- Parameters:
context
- TODOoptions
- options governing IR conversion
-
addLocal
public int addLocal() -
addInvocation
- Returns:
- the invoke instructions added by this operation
- Throws:
IllegalArgumentException
- if site is null
-
addReturn
Add a return statement -
addAllocation
Add a New statement of the given typeSide effect: adds call to default constructor of given type if one exists.
- Returns:
- instruction added, or null
- Throws:
IllegalArgumentException
- if T is null
-
add1DArrayAllocation
Add a New statement of the given array type and length -
addAllocationWithoutCtor
Add a New statement of the given type -
getValueNumberForIntConstant
public int getValueNumberForIntConstant(int c) -
getValueNumberForByteConstant
public int getValueNumberForByteConstant(byte c) -
getValueNumberForCharConstant
public int getValueNumberForCharConstant(char c) -
addPhi
public int addPhi(int[] values) -
addGetInstance
-
addGetStatic
-
addCheckcast
-
addSetInstance
-
addSetStatic
-
addSetArrayField
-
addGetArrayField
-
getInterpreter
-