use of soot.jimple.spark.internal.TypeManager in project soot by Sable.
the class PointsToSetInternal method getBitMask.
// Added by Adam Richard
protected BitVector getBitMask(PointsToSetInternal other, PAG pag) {
/*Prevents propogating points-to sets of inappropriate type.
*E.g. if you have in the code being analyzed:
*Shape s = (Circle)c;
*then the points-to set of s is only the elements in the points-to set
*of c that have type Circle.
*/
// Code ripped from BitPointsToSet
BitVector mask = null;
TypeManager typeManager = pag.getTypeManager();
if (!typeManager.castNeverFails(other.getType(), this.getType())) {
mask = typeManager.get(this.getType());
}
return mask;
}
use of soot.jimple.spark.internal.TypeManager in project soot by Sable.
the class HybridPointsToSet method nativeAddAll.
private boolean nativeAddAll(HybridPointsToSet other, HybridPointsToSet exclude) {
boolean ret = false;
TypeManager typeManager = pag.getTypeManager();
if (other.bits != null) {
convertToBits();
if (exclude != null) {
exclude.convertToBits();
}
BitVector mask = null;
if (!typeManager.castNeverFails(other.getType(), this.getType())) {
mask = typeManager.get(this.getType());
}
BitVector ebits = (exclude == null ? null : exclude.bits);
ret = bits.orAndAndNot(other.bits, mask, ebits);
} else {
for (int i = 0; i < nodes.length; i++) {
if (other.nodes[i] == null)
break;
if (exclude == null || !exclude.contains(other.nodes[i])) {
ret = add(other.nodes[i]) | ret;
}
}
}
if (ret)
empty = false;
return ret;
}
Aggregations