bug fix for PointerAnalysisImpl.toString and tests for this
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1636 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
parent
a013bb006e
commit
97083468b7
|
@ -84,7 +84,7 @@ public class PointsToMap {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If key is unifed, returns the representative for p.
|
* If key is unified, returns the representative for p.
|
||||||
*
|
*
|
||||||
* @param p
|
* @param p
|
||||||
* @return get(p)
|
* @return get(p)
|
||||||
|
@ -96,6 +96,9 @@ public class PointsToMap {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int i = pointerKeys.getMappedIndex(p);
|
int i = pointerKeys.getMappedIndex(p);
|
||||||
|
if (i == -1) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
int repI = uf.find(i);
|
int repI = uf.find(i);
|
||||||
PointsToSetVariable result = (PointsToSetVariable) pointsToSets.get(repI);
|
PointsToSetVariable result = (PointsToSetVariable) pointsToSets.get(repI);
|
||||||
if (result != null && p instanceof FilteredPointerKey && (!(result.getPointerKey() instanceof FilteredPointerKey))) {
|
if (result != null && p instanceof FilteredPointerKey && (!(result.getPointerKey() instanceof FilteredPointerKey))) {
|
||||||
|
@ -170,8 +173,8 @@ public class PointsToMap {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isImplicit(PointerKey p) {
|
public boolean isImplicit(PointerKey p) {
|
||||||
int i = findOrCreateIndex(p);
|
int i = getIndex(p);
|
||||||
return pointsToSets.get(i) == IMPLICIT;
|
return i != -1 && pointsToSets.get(i) == IMPLICIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected int getNumberOfPointerKeys() {
|
protected int getNumberOfPointerKeys() {
|
||||||
|
|
Loading…
Reference in New Issue