clean up some comments

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1555 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
sjfink 2007-07-26 16:31:50 +00:00
parent 9cd060cab6
commit d2dff82c1d
1 changed files with 7 additions and 59 deletions

View File

@ -179,9 +179,6 @@ public class TypeInference extends SSAInference implements FixedPointConstants {
} }
/** /**
*
* @author sfink
*
* An operator which initializes a type to a declared type. * An operator which initializes a type to a declared type.
*/ */
protected final class DeclaredTypeOperator extends NullaryOperator { protected final class DeclaredTypeOperator extends NullaryOperator {
@ -192,7 +189,7 @@ public class TypeInference extends SSAInference implements FixedPointConstants {
} }
/** /**
* Note that we need evalute this operator at most once * Note that we need evaluate this operator at most once
*/ */
@Override @Override
public byte evaluate(IVariable lhs) { public byte evaluate(IVariable lhs) {
@ -233,10 +230,6 @@ public class TypeInference extends SSAInference implements FixedPointConstants {
} }
} }
/**
* @author sfink
*
*/
private static final class PhiOperator extends AbstractOperator { private static final class PhiOperator extends AbstractOperator {
private PhiOperator() { private PhiOperator() {
@ -264,9 +257,6 @@ public class TypeInference extends SSAInference implements FixedPointConstants {
} }
} }
/**
* @see java.lang.Object#toString()
*/
@Override @Override
public String toString() { public String toString() {
return "phi meet"; return "phi meet";
@ -283,10 +273,6 @@ public class TypeInference extends SSAInference implements FixedPointConstants {
} }
} }
/**
* @author sfink
*
*/
private static final class PiOperator extends AbstractOperator { private static final class PiOperator extends AbstractOperator {
private PiOperator() { private PiOperator() {
@ -311,9 +297,6 @@ public class TypeInference extends SSAInference implements FixedPointConstants {
} }
} }
/**
* @see java.lang.Object#toString()
*/
@Override @Override
public String toString() { public String toString() {
return "pi"; return "pi";
@ -330,10 +313,6 @@ public class TypeInference extends SSAInference implements FixedPointConstants {
} }
} }
/**
* @author sfink
*
*/
protected static class PrimitivePropagateOperator extends AbstractOperator { protected static class PrimitivePropagateOperator extends AbstractOperator {
protected PrimitivePropagateOperator() { protected PrimitivePropagateOperator() {
@ -442,9 +421,6 @@ public class TypeInference extends SSAInference implements FixedPointConstants {
} }
} }
/**
* @see java.lang.Object#toString()
*/
@Override @Override
public String toString() { public String toString() {
return "getElementType " + load; return "getElementType " + load;
@ -643,28 +619,15 @@ public class TypeInference extends SSAInference implements FixedPointConstants {
this.type = other.type; this.type = other.type;
} }
/**
* Returns the type.
*
* @return TypeAbstraction
*/
public TypeAbstraction getType() { public TypeAbstraction getType() {
return type; return type;
} }
/**
* Sets the type.
*
* @param type
* The type to set
*/
public void setType(TypeAbstraction type) { public void setType(TypeAbstraction type) {
this.type = type; this.type = type;
} }
/**
* @see java.lang.Object#toString()
*/
@Override @Override
public String toString() { public String toString() {
return type.toString(); return type.toString();
@ -688,31 +651,16 @@ public class TypeInference extends SSAInference implements FixedPointConstants {
} }
} }
} }
// if (st.isStringConstant(valueNumber)) {
// IClass klass = cha.lookupClass(TypeReference.JavaLangString);
// TypeAbstraction stringTypeAbs = new PointType(klass,cha);
// return new TypeVariable(stringTypeAbs, 797 * valueNumber);
// }
return new TypeVariable(TypeAbstraction.TOP, 797 * valueNumber); return new TypeVariable(TypeAbstraction.TOP, 797 * valueNumber);
} }
} }
/**
* Returns the ir.
*
* @return IR
*/
public IR getIR() { public IR getIR() {
return ir; return ir;
} }
/**
* Method getType.
*
* @param valueNumber
* @return JavaTypeAbstraction
*/
public TypeAbstraction getType(int valueNumber) { public TypeAbstraction getType(int valueNumber) {
if (Assertions.verifyAssertions) { if (Assertions.verifyAssertions) {
if (getVariable(valueNumber) == null) { if (getVariable(valueNumber) == null) {
@ -734,8 +682,7 @@ public class TypeInference extends SSAInference implements FixedPointConstants {
SymbolTable st = ir.getSymbolTable(); SymbolTable st = ir.getSymbolTable();
if (!st.isConstant(valueNumber)) { if (!st.isConstant(valueNumber)) {
return TypeAbstraction.TOP; return TypeAbstraction.TOP;
} } else if (st.isIntegerConstant(valueNumber)) {
if (st.isIntegerConstant(valueNumber)) {
return PrimitiveType.INT; return PrimitiveType.INT;
} else if (st.isFloatConstant(valueNumber)) { } else if (st.isFloatConstant(valueNumber)) {
return PrimitiveType.FLOAT; return PrimitiveType.FLOAT;
@ -750,8 +697,9 @@ public class TypeInference extends SSAInference implements FixedPointConstants {
// Steve's code assumes American style (god forbid), so what you're getting // Steve's code assumes American style (god forbid), so what you're getting
// here // here
// is not undefined, but java.lang.Object [NR/EY] // is not undefined, but java.lang.Object [NR/EY]
if (getVariable(valueNumber) == null) if (getVariable(valueNumber) == null) {
return true; return true;
}
TypeAbstraction ta = ((TypeVariable) getVariable(valueNumber)).getType(); TypeAbstraction ta = ((TypeVariable) getVariable(valueNumber)).getType();
return ta == BOTTOM || ta.getType() == null; return ta == BOTTOM || ta.getType() == null;
} }