some debug support

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1962 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
sjfink 2007-10-26 16:06:46 +00:00
parent 2ddd9ea414
commit 2e98bc8778
1 changed files with 11 additions and 0 deletions

View File

@ -50,6 +50,8 @@ import com.ibm.wala.util.debug.Assertions;
* @author sfink
*/
public class TypeInference extends SSAInference<TypeVariable> implements FixedPointConstants {
private static final boolean DEBUG = false;
public static TypeInference make(IR ir, boolean doPrimitives) {
return new TypeInference(ir, doPrimitives);
@ -252,6 +254,15 @@ public class TypeInference extends SSAInference<TypeVariable> implements FixedPo
*/
@Override
public byte evaluate(TypeVariable lhs, IVariable[] rhs) {
if (DEBUG) {
System.err.print("PhiOperator.meet " + lhs + " ");
for (IVariable v : rhs) {
System.err.print(v + " ");
}
System.err.println();
}
TypeAbstraction lhsType = lhs.getType();
TypeAbstraction meet = TypeAbstraction.TOP;
for (int i = 0; i < rhs.length; i++) {