本文整理汇总了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;
}