guard a debugging statement with DEBUG

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2015 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
sjfink 2007-11-15 15:18:04 +00:00
parent 4913361df3
commit 8e089b528d
1 changed files with 17 additions and 11 deletions

View File

@ -140,12 +140,15 @@ public class TypeBasedHeapModel implements HeapModel {
}
if (s.isConstant(i)) {
if (s.isStringConstant(i)) {
TypeReference type = node.getMethod().getDeclaringClass().getClassLoader().getLanguage().getConstantType(s.getStringValue(i));
TypeReference type = node.getMethod().getDeclaringClass().getClassLoader().getLanguage().getConstantType(
s.getStringValue(i));
result.put(pointerKeys.getPointerKeyForLocal(node, i), getInstanceKeyForConstant(type, s.getConstantValue(i)));
}
} else {
TypeAbstraction t = ti.getType(i);
if (DEBUG) {
System.err.println(" type " + t);
}
if (t.getType() != null && t.getType().isReferenceType()) {
result.put(pointerKeys.getPointerKeyForLocal(node, i), pointerKeys.getFilteredPointerKeyForLocal(node, i,
new FilteredPointerKey.SingleClassFilter(t.getType())));
@ -227,10 +230,12 @@ public class TypeBasedHeapModel implements HeapModel {
}
/**
* Note that this always returns a {@link FilteredPointerKey}, since the {@link TypeBasedPointerAnalysis} relies on the
* type filter to compute points to sets.
* Note that this always returns a {@link FilteredPointerKey}, since the
* {@link TypeBasedPointerAnalysis} relies on the type filter to compute
* points to sets.
*
* @see com.ibm.wala.ipa.callgraph.propagation.PointerKeyFactory#getPointerKeyForLocal(com.ibm.wala.ipa.callgraph.CGNode, int)
* @see com.ibm.wala.ipa.callgraph.propagation.PointerKeyFactory#getPointerKeyForLocal(com.ibm.wala.ipa.callgraph.CGNode,
* int)
*/
public FilteredPointerKey getPointerKeyForLocal(CGNode node, int valueNumber) {
initPKeysForNode(node);
@ -260,7 +265,8 @@ public class TypeBasedHeapModel implements HeapModel {
}
}
public FilteredPointerKey getFilteredPointerKeyForLocal(CGNode node, int valueNumber, FilteredPointerKey.TypeFilter filter) throws UnimplementedError {
public FilteredPointerKey getFilteredPointerKeyForLocal(CGNode node, int valueNumber, FilteredPointerKey.TypeFilter filter)
throws UnimplementedError {
Assertions.UNREACHABLE();
return null;
}