/** * This is implemented as a shortcut for efficiency * * @return true iff that node has any successors */ public boolean hasAnySuccessor(int node) { return hasSuccessor.get(node); }
/** * This is implemented as a shortcut for efficiency * * @return true iff that node has any successors */ public boolean hasAnySuccessor(int node) { return hasSuccessor.get(node); }
/** * @return true iff block i is a catch block */ public boolean isCatchBlock(int i) { return catchBlocks.get(i); }
/** * This is implemented as a shortcut for efficiency * * @return true iff that node has any successors */ public boolean hasAnySuccessor(int node) { return hasSuccessor.get(node); }
@Override public boolean contains(int i) { if (i < 0) { throw new IllegalArgumentException("invalid i: " + i) ; } return bitVector.get(i); }
@Override public boolean contains(int i) { if (i < 0) { throw new IllegalArgumentException("invalid i: " + i) ; } return bitVector.get(i); }
/** * A "root" is a points-to-set whose contents do not result from flow from other points-to-sets; there points-to-sets are the * primordial assignments from which the transitive closure flows. */ boolean isTransitiveRoot(PointerKey key) { int i = findOrCreateIndex(key); return transitiveRoots.get(i); }
/** * Does this set contain a certain object? */ public boolean contains(T o) { int n = map.getMappedIndex(o); if (n == -1) { return false; } return vector.get(n); }
@Override public boolean add(int i) { if (bitVector.get(i)) { return false; } else { bitVector.set(i); populationCount++; populationCount = (populationCount == (UNDEFINED + 1)) ? UNDEFINED : populationCount; return true; } }
@Override public boolean add(int i) { if (bitVector.get(i)) { return false; } else { bitVector.set(i); populationCount++; populationCount = (populationCount == (UNDEFINED + 1)) ? UNDEFINED : populationCount; return true; } }
/** * Does this set contain a certain object? */ public boolean contains(T o) { int n = map.getMappedIndex(o); if (n == -1) { return false; } return vector.get(n); }
@Override public boolean add(int i) { if (bitVector.get(i)) { return false; } else { bitVector.set(i); populationCount++; populationCount = (populationCount == (UNDEFINED + 1)) ? UNDEFINED : populationCount; return true; } }
/** * @return true iff basic block B ends in a call instuction */ public boolean hasCall(BasicBlockInContext<T> B) { addNodeForBasicBlockIfNeeded(B); return hasCallVector.get(getNumber(B)); }
/** * Is this block marked as a catch block? */ @Override public boolean isCatchBlock() { return delegate.getCatchBlocks().get(getNumber()); }
@Override public T next() { T result = map.getMappedObject(nextCounter); int start = nextCounter + 1; nextCounter = -1; for (int i = start; i < vector.length(); i++) { if (vector.get(i)) { nextCounter = i; break; } } return result; }
public Set<TypeReference> computeExceptions(BitVector bitVector) { assert bitVector.length() == values.getSize(); Set<TypeReference> result = new HashSet<>(); for (int i = 0; i < bitVector.length(); i++) { if (bitVector.get(i)) { result.add(values.getMappedObject(i)); } } return result; }
public Set<TypeReference> computeExceptions(BitVector bitVector) { assert bitVector.length() == values.getSize(); Set<TypeReference> result = new HashSet<>(); for (int i = 0; i < bitVector.length(); i++) { if (bitVector.get(i)) { result.add(values.getMappedObject(i)); } } return result; }
@Override public BitVector getCatchBlocks() { BitVector original = ir.getControlFlowGraph().getCatchBlocks(); BitVector result = new BitVector(); for (int i = 0; i <= original.max(); i++) { if (original.get(i)) { result.set(i + 1); } } return result; }
private void createBasicBlocks(AbstractCFG G) { basicBlocks = new BasicBlock[G.getNumberOfNodes()]; for (int i = 0; i <= G.getMaxNumber(); i++) { if (G.getCatchBlocks().get(i)) { basicBlocks[i] = new ExceptionHandlerBasicBlock(i); } else { basicBlocks[i] = new BasicBlock(i); } } exit = basicBlocks[delegate.getNumber(delegate.exit())]; }
private void createBasicBlocks(AbstractCFG G) { basicBlocks = new BasicBlock[G.getNumberOfNodes()]; for (int i = 0; i <= G.getMaxNumber(); i++) { if (G.getCatchBlocks().get(i)) { basicBlocks[i] = new ExceptionHandlerBasicBlock(i); } else { basicBlocks[i] = new BasicBlock(i); } } exit = basicBlocks[delegate.getNumber(delegate.exit())]; }