public abstract class AnalysisContextPolicy<C extends AnalysisContext> extends Object
| Constructor and Description |
|---|
AnalysisContextPolicy(C emptyContext) |
| Modifier and Type | Method and Description |
|---|---|
abstract C |
allocationContext(C allocatorContext,
int maxHeapContextDepth)
Given the allocator method context this method returns the allocation context for a heap
allocated object.
|
abstract C |
calleeContext(PointsToAnalysis bb,
AnalysisObject receiverObject,
C callerContext,
MethodTypeFlow callee)
Given the receiver object, caller context and callee this method returns the callee context
for a virtual or special invoke.
|
C |
emptyContext()
Returns the empty context, i.e., the outer most context.
|
static BytecodePosition[] |
extend(BytecodePosition[] labelList,
BytecodePosition add)
Extends the input label list with a context label.
|
static BytecodePosition[] |
extend(BytecodePosition[] labelList,
BytecodePosition add,
int maxDepth)
Extends the input label list with a context label.
|
boolean |
isEmpty(C context) |
AnalysisContext |
lookupContext(C context) |
static BytecodePosition[] |
peel(BytecodePosition[] labelList,
int maxDepth) |
abstract C |
peel(C context,
int maxDepth)
Peels off the least recent labels from the current context, down to
maxDepth depth. |
abstract C |
staticCalleeContext(PointsToAnalysis bb,
BytecodePosition invokeLocation,
C callerContext,
MethodTypeFlow callee)
Given the invocation location, caller context and callee this method returns the callee
context for a static invoke.
|
public AnalysisContextPolicy(C emptyContext)
public final C emptyContext()
public final boolean isEmpty(C context)
public abstract C calleeContext(PointsToAnalysis bb, AnalysisObject receiverObject, C callerContext, MethodTypeFlow callee)
public abstract C staticCalleeContext(PointsToAnalysis bb, BytecodePosition invokeLocation, C callerContext, MethodTypeFlow callee)
public abstract C allocationContext(C allocatorContext, int maxHeapContextDepth)
public abstract C peel(C context, int maxDepth)
maxDepth depth.
Only the most recent labels are kept in the context, preserving the temporal order.public static BytecodePosition[] extend(BytecodePosition[] labelList,
BytecodePosition add,
int maxDepth)
maxDepth. Only the most recent context labels are kept in the chain, in the order
that they appeared in the call chain.public static BytecodePosition[] extend(BytecodePosition[] labelList,
BytecodePosition add)
public static BytecodePosition[] peel(BytecodePosition[] labelList,
int maxDepth)
public AnalysisContext lookupContext(C context)