本文整理匯總了Java中edu.umd.cs.findbugs.ba.vna.ValueNumberDataflow.getStartFact方法的典型用法代碼示例。如果您正苦於以下問題:Java ValueNumberDataflow.getStartFact方法的具體用法?Java ValueNumberDataflow.getStartFact怎麽用?Java ValueNumberDataflow.getStartFact使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類edu.umd.cs.findbugs.ba.vna.ValueNumberDataflow
的用法示例。
在下文中一共展示了ValueNumberDataflow.getStartFact方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: findPreviouslyDeadBlocks
import edu.umd.cs.findbugs.ba.vna.ValueNumberDataflow; //導入方法依賴的package包/類
/**
* Find set of blocks which were known to be dead before doing the null
* pointer analysis.
*
* @return set of previously dead blocks, indexed by block id
* @throws CFGBuilderException
* @throws DataflowAnalysisException
*/
private BitSet findPreviouslyDeadBlocks() throws DataflowAnalysisException, CFGBuilderException {
BitSet deadBlocks = new BitSet();
ValueNumberDataflow vnaDataflow = classContext.getValueNumberDataflow(method);
for (Iterator<BasicBlock> i = vnaDataflow.getCFG().blockIterator(); i.hasNext();) {
BasicBlock block = i.next();
ValueNumberFrame vnaFrame = vnaDataflow.getStartFact(block);
if (vnaFrame.isTop()) {
deadBlocks.set(block.getLabel());
}
}
return deadBlocks;
}
示例2: getParameterValueNumbers
import edu.umd.cs.findbugs.ba.vna.ValueNumberDataflow; //導入方法依賴的package包/類
private Set<ValueNumber> getParameterValueNumbers(ClassContext classContext, Method method, CFG cfg)
throws DataflowAnalysisException, CFGBuilderException {
ValueNumberDataflow vnaDataflow = classContext.getValueNumberDataflow(method);
ValueNumberFrame vnaFrameAtEntry = vnaDataflow.getStartFact(cfg.getEntry());
Set<ValueNumber> paramValueNumberSet = new HashSet<ValueNumber>();
int firstParam = method.isStatic() ? 0 : 1;
for (int i = firstParam; i < vnaFrameAtEntry.getNumLocals(); ++i) {
paramValueNumberSet.add(vnaFrameAtEntry.getValue(i));
}
return paramValueNumberSet;
}
示例3: findPreviouslyDeadBlocks
import edu.umd.cs.findbugs.ba.vna.ValueNumberDataflow; //導入方法依賴的package包/類
/**
* Find set of blocks which were known to be dead before doing the null
* pointer analysis.
*
* @return set of previously dead blocks, indexed by block id
* @throws CFGBuilderException
* @throws DataflowAnalysisException
*/
private BitSet findPreviouslyDeadBlocks() throws DataflowAnalysisException, CFGBuilderException {
BitSet deadBlocks = new BitSet();
ValueNumberDataflow vnaDataflow = classContext.getValueNumberDataflow(method);
for (Iterator<BasicBlock> i = vnaDataflow.getCFG().blockIterator(); i.hasNext();) {
BasicBlock block = i.next();
ValueNumberFrame vnaFrame = vnaDataflow.getStartFact(block);
if (vnaFrame.isTop()) {
deadBlocks.set(block.getLabel());
}
}
return deadBlocks;
}