bug fix in AbstractFlowGraph, small cleanup

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2779 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
msridhar1 2008-05-02 14:41:08 +00:00
parent 4ba4cb5cb5
commit 70f1f62118
2 changed files with 11 additions and 1 deletions

View File

@ -20,7 +20,9 @@ public abstract class AbstractRefinementPolicy implements RefinementPolicy {
private static final int DEFAULT_NUM_PASSES = 4;
private static final int[] DEFAULT_BUDGET_PER_PASS = { 1000, 12000, 12000, 12000 };
private static final int LONGER_PASS_BUDGET = 12000;
private static final int[] DEFAULT_BUDGET_PER_PASS = { 1000, LONGER_PASS_BUDGET, LONGER_PASS_BUDGET, LONGER_PASS_BUDGET };
protected final FieldRefinePolicy fieldRefinePolicy;

View File

@ -279,6 +279,10 @@ public abstract class AbstractFlowGraph extends SlowSparseNumberedLabeledGraph<O
for (MemoryAccess a : reads) {
IR ir = a.getNode().getIR();
SSAGetInstruction s = (SSAGetInstruction) ir.getInstructions()[a.getInstructionIndex()];
if (s == null) {
// actually dead code
continue;
}
PointerKey r = heapModel.getPointerKeyForLocal(a.getNode(), s.getDef());
// if (Assertions.verifyAssertions) {
// Assertions._assert(containsNode(r));
@ -366,6 +370,10 @@ public abstract class AbstractFlowGraph extends SlowSparseNumberedLabeledGraph<O
MemoryAccess a = it.next();
IR ir = a.getNode().getIR();
SSAArrayLoadInstruction s = (SSAArrayLoadInstruction) ir.getInstructions()[a.getInstructionIndex()];
if (s == null) {
// actually dead code
continue;
}
PointerKey r = heapModel.getPointerKeyForLocal(a.getNode(), s.getDef());
// if (Assertions.verifyAssertions) {
// Assertions._assert(containsNode(r));