@Override public boolean addAllInIntersection(IntSet other, IntSet filter) throws IllegalArgumentException { if (other == null) { throw new IllegalArgumentException("other == null"); } BitVectorIntSet o = new BitVectorIntSet(other); o.intersectWith(filter); return addAll(o); }
@Override public boolean addAllInIntersection(IntSet other, IntSet filter) throws IllegalArgumentException { if (other == null) { throw new IllegalArgumentException("other == null"); } BitVectorIntSet o = new BitVectorIntSet(other); o.intersectWith(filter); return addAll(o); }
@Override public boolean addAllInIntersection(IntSet other, IntSet filter) throws IllegalArgumentException { if (other == null) { throw new IllegalArgumentException("other == null"); } BitVectorIntSet o = new BitVectorIntSet(other); o.intersectWith(filter); return addAll(o); }
@Override public boolean addAll(IntSet set) { if (set instanceof BitVectorIntSet) { BitVector B = ((BitVectorIntSet) set).bitVector; int delta = bitVector.orWithDelta(B); populationCount += delta; populationCount = (populationCount == (delta + UNDEFINED)) ? UNDEFINED : populationCount; return (delta != 0); } else { BitVectorIntSet other = new BitVectorIntSet(set); return addAll(other); } }
@Override public boolean addAll(IntSet set) { if (set instanceof BitVectorIntSet) { BitVector B = ((BitVectorIntSet) set).bitVector; int delta = bitVector.orWithDelta(B); populationCount += delta; populationCount = (populationCount == (delta + UNDEFINED)) ? UNDEFINED : populationCount; return (delta != 0); } else { BitVectorIntSet other = new BitVectorIntSet(set); return addAll(other); } }
@Override public boolean addAll(IntSet set) { if (set instanceof BitVectorIntSet) { BitVector B = ((BitVectorIntSet) set).bitVector; int delta = bitVector.orWithDelta(B); populationCount += delta; populationCount = (populationCount == (delta + UNDEFINED)) ? UNDEFINED : populationCount; return (delta != 0); } else { BitVectorIntSet other = new BitVectorIntSet(set); return addAll(other); } }
@Override public IntSet getSuccNodeNumbers(T node) { BitVectorIntSet succs = new BitVectorIntSet(); for (U label : nodeToSuccLabels.get(node)) { succs.addAll(getSuccNodeNumbers(node, label)); } return succs; }
@Override public IntSet getSuccNodeNumbers(T node) { BitVectorIntSet succs = new BitVectorIntSet(); for (U label : nodeToSuccLabels.get(node)) { succs.addAll(getSuccNodeNumbers(node, label)); } return succs; }
@Override public IntSet getPredNodeNumbers(T node) { BitVectorIntSet preds = new BitVectorIntSet(); for (U label : nodeToPredLabels.get(node)) { preds.addAll(getPredNodeNumbers(node, label)); } return preds; }
@Override public IntSet getPredNodeNumbers(T node) { BitVectorIntSet preds = new BitVectorIntSet(); for (U label : nodeToPredLabels.get(node)) { preds.addAll(getPredNodeNumbers(node, label)); } return preds; }
@Override public IntSet getPredNodeNumbers(T node) { BitVectorIntSet preds = new BitVectorIntSet(); for (U label : nodeToPredLabels.get(node)) { preds.addAll(getPredNodeNumbers(node, label)); } return preds; }
@Override public IntSet getSuccNodeNumbers(T node) { BitVectorIntSet succs = new BitVectorIntSet(); for (U label : nodeToSuccLabels.get(node)) { succs.addAll(getSuccNodeNumbers(node, label)); } return succs; }
/** * @return the set of all locations read by any callee at a call site. */ private static OrdinalSet<PointerKey> unionHeapLocations(CallGraph cg, CGNode n, SSAAbstractInvokeInstruction call, Map<CGNode, OrdinalSet<PointerKey>> loc) { BitVectorIntSet bv = new BitVectorIntSet(); for (CGNode t : cg.getPossibleTargets(n, call.getCallSite())) { bv.addAll(loc.get(t).getBackingSet()); } return new OrdinalSet<>(bv, loc.get(n).getMapping()); }
/** * @return the set of all locations read by any callee at a call site. */ private static OrdinalSet<PointerKey> unionHeapLocations(CallGraph cg, CGNode n, SSAAbstractInvokeInstruction call, Map<CGNode, OrdinalSet<PointerKey>> loc) { BitVectorIntSet bv = new BitVectorIntSet(); for (CGNode t : cg.getPossibleTargets(n, call.getCallSite())) { bv.addAll(loc.get(t).getBackingSet()); } return new OrdinalSet<>(bv, loc.get(n).getMapping()); }
private boolean addAllInternal(BitVectorIntSet set) { // should have hijacked this case before getting here! assert sharedPart != set; if (privatePart == null) { if (sharedPart == null) { copyValue(set); return !set.isEmpty(); } } BitVectorIntSet temp = makeDenseCopy(); boolean result = temp.addAll(set); copyValue(temp); return result; }
private boolean addAllInternal(BitVectorIntSet set) { // should have hijacked this case before getting here! assert sharedPart != set; if (privatePart == null) { if (sharedPart == null) { copyValue(set); return !set.isEmpty(); } } BitVectorIntSet temp = makeDenseCopy(); boolean result = temp.addAll(set); copyValue(temp); return result; }
private boolean addAllInternal(BitVectorIntSet set) { // should have hijacked this case before getting here! assert sharedPart != set; if (privatePart == null) { if (sharedPart == null) { copyValue(set); return !set.isEmpty(); } } BitVectorIntSet temp = makeDenseCopy(); boolean result = temp.addAll(set); copyValue(temp); return result; }