当前位置: 首页>>代码示例>>Java>>正文


Java ValueNumberDataflow.getStartFact方法代码示例

本文整理汇总了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;
}
 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:22,代码来源:NoiseNullDeref.java

示例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;
}
 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:12,代码来源:FindBadCast2.java

示例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;
}
 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:22,代码来源:FindNullDeref.java


注:本文中的edu.umd.cs.findbugs.ba.vna.ValueNumberDataflow.getStartFact方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。