public class IsNullValueAnalysis extends FrameDataflowAnalysis<IsNullValue,IsNullValueFrame> implements EdgeTypes, IsNullValueAnalysisFeatures
IsNullValue
,
IsNullValueFrame
,
IsNullValueFrameModelingVisitor
Modifier and Type | Class and Description |
---|---|
static class |
IsNullValueAnalysis.PointerEqualityCheck |
BACKEDGE_SOURCE_EDGE, BACKEDGE_TARGET_EDGE, CHECKED_EXCEPTIONS_FLAG, EXIT_EDGE, EXPLICIT_EXCEPTIONS_FLAG, FALL_THROUGH_EDGE, GOTO_EDGE, HANDLED_EXCEPTION_EDGE, IFCMP_EDGE, JSR_EDGE, RET_EDGE, RETURN_EDGE, START_EDGE, SWITCH_DEFAULT_EDGE, SWITCH_EDGE, UNHANDLED_EXCEPTION_EDGE, UNKNOWN_EDGE
NCP_EXTRA_BRANCH, NO_SPLIT_DOWNGRADE_NSP, NO_SWITCH_DEFAULT_AS_EXCEPTION, UNKNOWN_VALUES_ARE_NSP, USE_TYPE_QUALIFIERS
Constructor and Description |
---|
IsNullValueAnalysis(MethodDescriptor descriptor,
org.apache.bcel.generic.MethodGen methodGen,
CFG cfg,
ValueNumberDataflow vnaDataflow,
TypeDataflow typeDataflow,
DepthFirstSearch dfs,
AssertionMethods assertionMethods) |
Modifier and Type | Method and Description |
---|---|
void |
addLocationWhereValueBecomesNull(LocationWhereValueBecomesNull locationWhereValueBecomesNull) |
IsNullValueFrame |
createFact()
Create empty (uninitialized) dataflow facts for one program point.
|
void |
endTransfer(BasicBlock basicBlock,
org.apache.bcel.generic.InstructionHandle end,
IsNullValueFrame result) |
JavaClassAndMethod |
getClassAndMethod() |
IsNullValueFrame |
getFactAtMidEdge(Edge edge) |
static IsNullValueAnalysis.PointerEqualityCheck |
getForPointerEqualityCheck(CFG cfg,
ValueNumberDataflow vna) |
java.util.Set<LocationWhereValueBecomesNull> |
getLocationWhereValueBecomesNullSet() |
void |
initEntryFact(IsNullValueFrame result)
Initialize the "entry" fact for the graph.
|
void |
meetInto(IsNullValueFrame fact,
Edge edge,
IsNullValueFrame result)
Meet a dataflow fact associated with an incoming edge into another fact.
|
void |
meetInto(IsNullValueFrame fact,
Edge edge,
IsNullValueFrame result,
boolean propagatePhiNodeInformation) |
protected void |
mergeInto(IsNullValueFrame other,
IsNullValueFrame result)
Merge one frame into another.
|
protected void |
mergeValues(IsNullValueFrame otherFrame,
IsNullValueFrame resultFrame,
int slot)
Merge the values contained in a given slot of two Frames.
|
void |
setClassAndMethod(JavaClassAndMethod classAndMethod) |
void |
startIteration()
Called before beginning an iteration of analysis.
|
void |
startTransfer() |
void |
transfer(BasicBlock basicBlock,
org.apache.bcel.generic.InstructionHandle end,
IsNullValueFrame start,
IsNullValueFrame result)
Transfer function for the analysis.
|
void |
transferInstruction(org.apache.bcel.generic.InstructionHandle handle,
BasicBlock basicBlock,
IsNullValueFrame fact)
Transfer function for a single instruction.
|
copy, getFactAtPC, getFactBeforeExceptionCheck, getLastUpdateTimestamp, isFactValid, isTop, makeFactTop, modifyFrame, same, setLastUpdateTimestamp
getBlockOrder, getDepthFirstSearch, isForwards
getFactAfterLocation, getFactAtLocation
edgeTransfer, factToString, finishIteration, getFactOnEdge, getResultFact, getStartFact, resultFactIterator
public IsNullValueAnalysis(MethodDescriptor descriptor, org.apache.bcel.generic.MethodGen methodGen, CFG cfg, ValueNumberDataflow vnaDataflow, TypeDataflow typeDataflow, DepthFirstSearch dfs, AssertionMethods assertionMethods)
@CheckForNull public static IsNullValueAnalysis.PointerEqualityCheck getForPointerEqualityCheck(CFG cfg, ValueNumberDataflow vna)
public void setClassAndMethod(JavaClassAndMethod classAndMethod)
public JavaClassAndMethod getClassAndMethod()
public IsNullValueFrame createFact()
DataflowAnalysis
createFact
in interface DataflowAnalysis<IsNullValueFrame>
public void initEntryFact(IsNullValueFrame result)
DataflowAnalysis
initEntryFact
in interface DataflowAnalysis<IsNullValueFrame>
public void transfer(BasicBlock basicBlock, @CheckForNull org.apache.bcel.generic.InstructionHandle end, IsNullValueFrame start, IsNullValueFrame result) throws DataflowAnalysisException
DataflowAnalysis
transfer
in interface DataflowAnalysis<IsNullValueFrame>
transfer
in class AbstractDataflowAnalysis<IsNullValueFrame>
basicBlock
- the basic blockend
- if nonnull, stop before considering this instruction;
otherwise, consider all of the instructions in the basic blockstart
- dataflow facts at beginning of block (if forward analysis) or
end of block (if backwards analysis)result
- resulting dataflow facts at other end of blockDataflowAnalysisException
public void startTransfer()
public void endTransfer(BasicBlock basicBlock, @CheckForNull org.apache.bcel.generic.InstructionHandle end, IsNullValueFrame result) throws DataflowAnalysisException
DataflowAnalysisException
public void transferInstruction(org.apache.bcel.generic.InstructionHandle handle, BasicBlock basicBlock, IsNullValueFrame fact) throws DataflowAnalysisException
AbstractDataflowAnalysis
transferInstruction
in class AbstractDataflowAnalysis<IsNullValueFrame>
handle
- the instructionbasicBlock
- the BasicBlock containing the instruction; needed to
disambiguate instructions in inlined JSR subroutinesfact
- which should be modified based on the instructionDataflowAnalysisException
public void meetInto(IsNullValueFrame fact, Edge edge, IsNullValueFrame result) throws DataflowAnalysisException
DataflowAnalysis
meetInto
in interface DataflowAnalysis<IsNullValueFrame>
fact
- the predecessor fact (incoming edge)edge
- the edge from the predecessorresult
- the result factDataflowAnalysisException
public void meetInto(IsNullValueFrame fact, Edge edge, IsNullValueFrame result, boolean propagatePhiNodeInformation) throws DataflowAnalysisException
DataflowAnalysisException
protected void mergeInto(IsNullValueFrame other, IsNullValueFrame result) throws DataflowAnalysisException
FrameDataflowAnalysis
mergeInto
in class FrameDataflowAnalysis<IsNullValue,IsNullValueFrame>
other
- the frame to merge with the resultresult
- the result frame, which is modified to be the merge of the two
framesDataflowAnalysisException
public void startIteration()
DataflowAnalysis
startIteration
in interface DataflowAnalysis<IsNullValueFrame>
startIteration
in class BasicAbstractDataflowAnalysis<IsNullValueFrame>
public void addLocationWhereValueBecomesNull(LocationWhereValueBecomesNull locationWhereValueBecomesNull)
public java.util.Set<LocationWhereValueBecomesNull> getLocationWhereValueBecomesNullSet()
protected void mergeValues(IsNullValueFrame otherFrame, IsNullValueFrame resultFrame, int slot) throws DataflowAnalysisException
FrameDataflowAnalysis
mergeValues
in class FrameDataflowAnalysis<IsNullValue,IsNullValueFrame>
otherFrame
- a FrameresultFrame
- a Frame which will contain the resulting merged valueslot
- a slot in both framesDataflowAnalysisException
public IsNullValueFrame getFactAtMidEdge(Edge edge) throws DataflowAnalysisException
DataflowAnalysisException
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.