|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umd.cs.findbugs.ba.AbstractDataflowAnalysis<Fact>
edu.umd.cs.findbugs.ba.ForwardDataflowAnalysis<LockCount>
edu.umd.cs.findbugs.ba.LockCountAnalysis
public abstract class LockCountAnalysis
Family of dataflow analyses for counting the number of locks held at points in a method. Subclasses just need to override the initEntryFact() and getDelta() methods.
Dataflow
,
DataflowAnalysis
,
LockCount
Field Summary | |
---|---|
private static boolean |
DEBUG
|
protected org.apache.bcel.generic.MethodGen |
methodGen
|
protected ValueNumberDataflow |
vnaDataflow
|
Constructor Summary | |
---|---|
LockCountAnalysis(org.apache.bcel.generic.MethodGen methodGen,
ValueNumberDataflow vnaDataflow,
DepthFirstSearch dfs)
Constructor. |
Method Summary | |
---|---|
void |
copy(LockCount source,
LockCount dest)
Copy dataflow facts. |
LockCount |
createFact()
Create empty (uninitialized) dataflow facts for one program point. |
abstract int |
getDelta(org.apache.bcel.generic.Instruction ins,
ValueNumberFrame frame)
Get the lock count delta resulting from the execution of the given instruction. |
private ValueNumberFrame |
getFrame(org.apache.bcel.generic.InstructionHandle handle,
BasicBlock basicBlock)
|
void |
initResultFact(LockCount result)
Initialize result fact for block. |
boolean |
isFactValid(LockCount fact)
Determine whether the given fact is valid (neither top nor bottom). |
boolean |
isThisValue(ValueNumber valNum)
|
void |
makeFactTop(LockCount fact)
Make given fact the top value. |
void |
meetInto(LockCount fact,
Edge edge,
LockCount result)
Meet a dataflow fact associated with an incoming edge into another fact. |
boolean |
same(LockCount fact1,
LockCount fact2)
Are given dataflow facts the same? |
void |
transferInstruction(org.apache.bcel.generic.InstructionHandle handle,
BasicBlock basicBlock,
LockCount fact)
Transfer function for a single instruction. |
Methods inherited from class edu.umd.cs.findbugs.ba.ForwardDataflowAnalysis |
---|
getBlockOrder, getDepthFirstSearch, isForwards |
Methods inherited from class edu.umd.cs.findbugs.ba.AbstractDataflowAnalysis |
---|
endTransfer, factToString, getFactAfterLocation, getFactAtLocation, getResultFact, getStartFact, resultFactIterator, startTransfer, transfer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface edu.umd.cs.findbugs.ba.DataflowAnalysis |
---|
initEntryFact |
Field Detail |
---|
private static final boolean DEBUG
protected final org.apache.bcel.generic.MethodGen methodGen
protected final ValueNumberDataflow vnaDataflow
Constructor Detail |
---|
public LockCountAnalysis(org.apache.bcel.generic.MethodGen methodGen, ValueNumberDataflow vnaDataflow, DepthFirstSearch dfs)
methodGen
- method being analyzedvnaDataflow
- the Dataflow object used to execute ValueNumberAnalysis on the methoddfs
- DepthFirstSearch on the methodMethod Detail |
---|
public boolean isThisValue(ValueNumber valNum)
public LockCount createFact()
DataflowAnalysis
public void copy(LockCount source, LockCount dest)
DataflowAnalysis
public void initResultFact(LockCount result)
DataflowAnalysis
public void makeFactTop(LockCount fact)
DataflowAnalysis
public boolean isFactValid(LockCount fact)
AbstractDataflowAnalysis
isFactValid
in class AbstractDataflowAnalysis<LockCount>
public boolean same(LockCount fact1, LockCount fact2)
DataflowAnalysis
public void transferInstruction(org.apache.bcel.generic.InstructionHandle handle, BasicBlock basicBlock, LockCount fact) throws DataflowAnalysisException
AbstractDataflowAnalysis
transferInstruction
in class AbstractDataflowAnalysis<LockCount>
handle
- the instructionbasicBlock
- the BasicBlock containing the instruction; needed to disambiguate
instructions in inlined JSR subroutinesfact
- which should be modified based on the instruction
DataflowAnalysisException
private ValueNumberFrame getFrame(org.apache.bcel.generic.InstructionHandle handle, BasicBlock basicBlock)
public void meetInto(LockCount fact, Edge edge, LockCount result) throws DataflowAnalysisException
DataflowAnalysis
fact
- the predecessor fact (incoming edge)edge
- the edge from the predecessorresult
- the result fact
DataflowAnalysisException
public abstract int getDelta(org.apache.bcel.generic.Instruction ins, ValueNumberFrame frame) throws DataflowAnalysisException
ins
- the instructionframe
- the ValueNumberFrame representing the values in the Java stack
frame at the point in the control-flow graph before the instruction
DataflowAnalysisException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |