mostly clean up old comments.

also rename InferGraphRootsImpl to InferGraphRoots

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1199 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
sjfink 2007-05-30 18:59:34 +00:00
parent 60058dec8b
commit e8e0ae5d30
28 changed files with 77 additions and 131 deletions

View File

@ -1,4 +1,4 @@
#Wed May 30 11:25:52 EDT 2007
#Wed May 30 11:45:21 EDT 2007
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
@ -7,6 +7,7 @@ org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.doc.comment.support=enabled
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
@ -25,9 +26,20 @@ org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning

View File

@ -58,9 +58,7 @@ final public class ArrayLengthInstruction extends Instruction {
public String toString() {
return "ArrayLength()";
}
/* (non-Javadoc)
* @see com.ibm.domo.cfg.IInstruction#isPEI()
*/
public boolean isPEI() {
return true;
}

View File

@ -91,9 +91,6 @@ final public class ArrayLoadInstruction extends Instruction {
public void visit(Visitor v) throws NullPointerException {
v.visitArrayLoad(this);
}
/* (non-Javadoc)
* @see com.ibm.domo.cfg.IInstruction#isPEI()
*/
public boolean isPEI() {
return true;
}

View File

@ -70,9 +70,7 @@ final public class ArrayStoreInstruction extends Instruction {
public void visit(Visitor v) throws NullPointerException {
v.visitArrayStore(this);
}
/* (non-Javadoc)
* @see com.ibm.domo.cfg.IInstruction#isPEI()
*/
public boolean isPEI() {
return true;
}

View File

@ -141,11 +141,6 @@ final public class BinaryOpInstruction extends Instruction {
return "BinaryOp(" + getType() + "," + getOperator() + ")";
}
/*
* (non-Javadoc)
*
* @see com.ibm.domo.cfg.IInstruction#isPEI()
*/
public boolean isPEI() {
return opcode == Constants.OP_idiv;
}

View File

@ -77,9 +77,7 @@ final public class CheckCastInstruction extends Instruction {
public String toString() {
return "CheckCast(" + type + ")";
}
/* (non-Javadoc)
* @see com.ibm.domo.cfg.IInstruction#isPEI()
*/
public boolean isPEI() {
return true;
}

View File

@ -135,11 +135,6 @@ final public class ComparisonInstruction extends Instruction {
return "Comparison(" + getType() + "," + getOperator() + ")";
}
/*
* (non-Javadoc)
*
* @see com.ibm.domo.cfg.IInstruction#isPEI()
*/
public boolean isPEI() {
return false;
}

View File

@ -137,11 +137,6 @@ public final class ConditionalBranchInstruction extends Instruction {
v.visitConditionalBranch(this);
}
/*
* (non-Javadoc)
*
* @see com.ibm.domo.cfg.IInstruction#isPEI()
*/
public boolean isPEI() {
return false;
}

View File

@ -95,7 +95,9 @@ public abstract class ConstantInstruction extends Instruction {
final static class LazyInt extends ConstInt {
private ConstantPoolReader cp;
private int index;
private boolean isSet;
protected LazyInt(short opcode, ConstantPoolReader cp, int index) {
@ -165,7 +167,9 @@ public abstract class ConstantInstruction extends Instruction {
final static class LazyLong extends ConstLong {
private ConstantPoolReader cp;
private int index;
private boolean isSet;
protected LazyLong(short opcode, ConstantPoolReader cp, int index) {
@ -235,7 +239,9 @@ public abstract class ConstantInstruction extends Instruction {
final static class LazyFloat extends ConstFloat {
private ConstantPoolReader cp;
private int index;
private boolean isSet;
protected LazyFloat(short opcode, ConstantPoolReader cp, int index) {
@ -305,7 +311,9 @@ public abstract class ConstantInstruction extends Instruction {
final static class LazyDouble extends ConstDouble {
private ConstantPoolReader cp;
private int index;
private boolean isSet;
protected LazyDouble(short opcode, ConstantPoolReader cp, int index) {
@ -360,6 +368,7 @@ public abstract class ConstantInstruction extends Instruction {
final static class LazyString extends ConstString {
private ConstantPoolReader cp;
private int index;
protected LazyString(short opcode, ConstantPoolReader cp, int index) {
@ -412,6 +421,7 @@ public abstract class ConstantInstruction extends Instruction {
final static class LazyClass extends ConstClass {
private ConstantPoolReader cp;
private int index;
protected LazyClass(short opcode, ConstantPoolReader cp, int index) {
@ -581,10 +591,7 @@ public abstract class ConstantInstruction extends Instruction {
final public String toString() {
return "Constant(" + getType() + "," + quote(getValue()) + ")";
}
/* (non-Javadoc)
* @see com.ibm.domo.cfg.IInstruction#isPEI()
*/
public boolean isPEI() {
return false;
}

View File

@ -117,11 +117,6 @@ public final class ConversionInstruction extends Instruction {
v.visitConversion(this);
}
/*
* (non-Javadoc)
*
* @see com.ibm.domo.cfg.IInstruction#isPEI()
*/
public boolean isPEI() {
return false;
}

View File

@ -18,6 +18,7 @@ package com.ibm.wala.shrikeBT;
*/
public final class DupInstruction extends Instruction {
private int size;
private byte delta;
protected DupInstruction(byte size, byte delta) {
@ -99,15 +100,13 @@ public final class DupInstruction extends Instruction {
}
@Override
public void visit(Visitor v) {
public void visit(Visitor v) {
if (v == null) {
throw new IllegalArgumentException("illegal null visitor");
}
v.visitDup(this);
}
/* (non-Javadoc)
* @see com.ibm.domo.cfg.IInstruction#isPEI()
*/
public boolean isPEI() {
return false;
}

View File

@ -22,18 +22,19 @@ package com.ibm.wala.shrikeBT;
* entire block of code:
*
* <pre>
*
* ExceptionHandler[] hs = {
* new ExceptionHandler(110, &quot;Ljava.lang.NullPointerException;&quot;),
* new ExceptionHandler(220, &quot;Ljava.io.IOException;&quot;);
* };
* for (int i = 0; i &lt; 100; i++) {
* handlers[i] = hs;
* }
*
* ExceptionHandler[] hs = {
* new ExceptionHandler(110, &quot;Ljava.lang.NullPointerException;&quot;),
* new ExceptionHandler(220, &quot;Ljava.io.IOException;&quot;);
* };
* for (int i = 0; i &lt; 100; i++) {
* handlers[i] = hs;
* }
* </pre>
*/
final public class ExceptionHandler {
int handler;
String catchClass;
/**
@ -70,12 +71,9 @@ final public class ExceptionHandler {
return h.handler == handler && (catchClass == null ? h.catchClass == null : catchClass.equals(h.catchClass));
}
/* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
return 1069 * handler + ((catchClass == null) ? 0 : catchClass.hashCode());
return 1069 * handler + ((catchClass == null) ? 0 : catchClass.hashCode());
}
@Override

View File

@ -15,7 +15,9 @@ package com.ibm.wala.shrikeBT;
*/
public class GetInstruction extends Instruction {
protected String type;
protected String classType;
protected String fieldName;
GetInstruction(short opcode, String type, String classType, String fieldName) {
@ -31,6 +33,7 @@ public class GetInstruction extends Instruction {
final static class Lazy extends GetInstruction {
private ConstantPoolReader cp;
private int index;
Lazy(short opcode, ConstantPoolReader cp, int index) {
@ -150,9 +153,7 @@ public class GetInstruction extends Instruction {
}
v.visitGet(this);
}
/* (non-Javadoc)
* @see com.ibm.domo.cfg.IInstruction#isPEI()
*/
public boolean isPEI() {
return true;
}

View File

@ -54,11 +54,6 @@ public final class GotoInstruction extends Instruction {
return label[0];
}
/*
* (non-Javadoc)
*
* @see com.ibm.wala.shrikeBT.Instruction#redirectTargets(int[])
*/
@Override
public Instruction redirectTargets(int[] targetMap) throws IllegalArgumentException {
if (targetMap == null) {
@ -99,11 +94,6 @@ public final class GotoInstruction extends Instruction {
v.visitGoto(this);
}
/*
* (non-Javadoc)
*
* @see com.ibm.domo.cfg.IInstruction#isPEI()
*/
public boolean isPEI() {
return false;
}

View File

@ -60,7 +60,7 @@ public final class InstanceofInstruction extends Instruction {
}
@Override
public void visit(Visitor v) throws IllegalArgumentException{
public void visit(Visitor v) throws IllegalArgumentException {
if (v == null) {
throw new IllegalArgumentException();
}
@ -71,9 +71,7 @@ public final class InstanceofInstruction extends Instruction {
public String toString() {
return "Instanceof(" + type + ")";
}
/* (non-Javadoc)
* @see com.ibm.domo.cfg.IInstruction#isPEI()
*/
public boolean isPEI() {
return false;
}

View File

@ -15,7 +15,9 @@ package com.ibm.wala.shrikeBT;
*/
public class InvokeInstruction extends Instruction implements IInvokeInstruction {
protected String type;
protected String classType;
protected String methodName;
InvokeInstruction(short opcode, String type, String classType, String methodName) {
@ -47,6 +49,7 @@ public class InvokeInstruction extends Instruction implements IInvokeInstruction
final static class Lazy extends InvokeInstruction {
private ConstantPoolReader cp;
private int index;
Lazy(short opcode, ConstantPoolReader cp, int index) {
@ -175,20 +178,10 @@ public class InvokeInstruction extends Instruction implements IInvokeInstruction
return "Invoke(" + getInvocationModeString() + "," + getClassType() + "," + getMethodName() + "," + getMethodSignature() + ")";
}
/*
* (non-Javadoc)
*
* @see com.ibm.domo.cfg.IInstruction#isPEI()
*/
public boolean isPEI() {
return true;
}
/*
* (non-Javadoc)
*
* @see com.ibm.domo.cfg.IInvokeInstruction#getInvocationCode()
*/
public Dispatch getInvocationCode() {
switch (opcode) {
case Constants.OP_invokestatic:

View File

@ -97,9 +97,7 @@ public final class LoadInstruction extends Instruction {
public String toString() {
return "LocalLoad(" + getType() + "," + index + ")";
}
/* (non-Javadoc)
* @see com.ibm.domo.cfg.IInstruction#isPEI()
*/
public boolean isPEI() {
return false;
}

View File

@ -19,6 +19,7 @@ public final class MonitorInstruction extends Instruction {
}
private final static MonitorInstruction enter = new MonitorInstruction(OP_monitorenter);
private final static MonitorInstruction exit = new MonitorInstruction(OP_monitorexit);
public static MonitorInstruction make(boolean entering) {
@ -50,7 +51,7 @@ public final class MonitorInstruction extends Instruction {
}
@Override
public void visit(Visitor v) throws IllegalArgumentException{
public void visit(Visitor v) throws IllegalArgumentException {
if (v == null) {
throw new IllegalArgumentException();
}
@ -61,9 +62,7 @@ public final class MonitorInstruction extends Instruction {
public String toString() {
return "Monitor(" + (isEnter() ? "ENTER" : "EXIT") + ")";
}
/* (non-Javadoc)
* @see com.ibm.domo.cfg.IInstruction#isPEI()
*/
public boolean isPEI() {
return true;
}

View File

@ -28,7 +28,8 @@ public final class NewInstruction extends Instruction {
* @param arrayBoundsCount
* the number of array dimensions to preconstruct (equal to the
* number of integer parameters this instruction expects)
* @throws IllegalArgumentException if type is null
* @throws IllegalArgumentException
* if type is null
*/
public static NewInstruction make(String type, int arrayBoundsCount) throws IllegalArgumentException {
if (type == null) {
@ -116,11 +117,6 @@ public final class NewInstruction extends Instruction {
v.visitNew(this);
}
/*
* (non-Javadoc)
*
* @see com.ibm.domo.cfg.IInstruction#isPEI()
*/
public boolean isPEI() {
return true;
}

View File

@ -65,11 +65,6 @@ public final class PopInstruction extends Instruction {
return "Pop(" + size + ")";
}
/*
* (non-Javadoc)
*
* @see com.ibm.domo.cfg.IInstruction#isPEI()
*/
public boolean isPEI() {
return false;
}

View File

@ -15,7 +15,9 @@ package com.ibm.wala.shrikeBT;
*/
public class PutInstruction extends Instruction {
protected String type;
protected String classType;
protected String fieldName;
PutInstruction(short opcode, String type, String classType, String fieldName) {
@ -31,6 +33,7 @@ public class PutInstruction extends Instruction {
final static class Lazy extends PutInstruction {
private ConstantPoolReader cp;
private int index;
Lazy(short opcode, ConstantPoolReader cp, int index) {
@ -137,9 +140,7 @@ public class PutInstruction extends Instruction {
final public void visit(Visitor v) throws NullPointerException {
v.visitPut(this);
}
/* (non-Javadoc)
* @see com.ibm.domo.cfg.IInstruction#isPEI()
*/
public boolean isPEI() {
return true;
}

View File

@ -19,6 +19,7 @@ public final class ReturnInstruction extends Instruction {
}
private static final ReturnInstruction[] preallocated = preallocate();
private static final ReturnInstruction preallocatedVoid = new ReturnInstruction(OP_return);
private static ReturnInstruction[] preallocate() {
@ -82,9 +83,7 @@ public final class ReturnInstruction extends Instruction {
public String toString() {
return "Return(" + getType() + ")";
}
/* (non-Javadoc)
* @see com.ibm.domo.cfg.IInstruction#isPEI()
*/
public boolean isPEI() {
return false;
}

View File

@ -17,7 +17,9 @@ package com.ibm.wala.shrikeBT;
*/
public final class ShiftInstruction extends Instruction {
public enum Operator implements BinaryOpInstruction.IOperator {
SHL, SHR, USHR;
SHL,
SHR,
USHR;
}
protected ShiftInstruction(short opcode) {
@ -93,9 +95,7 @@ public final class ShiftInstruction extends Instruction {
public String toString() {
return "Shift(" + getType() + "," + getOperator() + ")";
}
/* (non-Javadoc)
* @see com.ibm.domo.cfg.IInstruction#isPEI()
*/
public boolean isPEI() {
return false;
}

View File

@ -92,9 +92,7 @@ public final class StoreInstruction extends Instruction {
public void visit(Visitor v) throws NullPointerException {
v.visitLocalStore(this);
}
/* (non-Javadoc)
* @see com.ibm.domo.cfg.IInstruction#isPEI()
*/
public boolean isPEI() {
return false;
}

View File

@ -52,9 +52,7 @@ public final class SwapInstruction extends Instruction {
public void visit(Visitor v) throws NullPointerException {
v.visitSwap(this);
}
/* (non-Javadoc)
* @see com.ibm.domo.cfg.IInstruction#isPEI()
*/
public boolean isPEI() {
return false;
}

View File

@ -49,7 +49,8 @@ public final class SwitchInstruction extends Instruction {
* order by case
* @param defaultLabel
* the default label to branch to if no cases match
* @throws IllegalArgumentException if casesAndLabels is null
* @throws IllegalArgumentException
* if casesAndLabels is null
*/
public static SwitchInstruction make(int[] casesAndLabels, int defaultLabel) {
if (casesAndLabels == null) {
@ -151,11 +152,6 @@ public final class SwitchInstruction extends Instruction {
v.visitSwitch(this);
}
/*
* (non-Javadoc)
*
* @see com.ibm.domo.cfg.IInstruction#isPEI()
*/
public boolean isPEI() {
return false;
}

View File

@ -56,9 +56,7 @@ public final class ThrowInstruction extends Instruction {
public String toString() {
return "Throw()";
}
/* (non-Javadoc)
* @see com.ibm.domo.cfg.IInstruction#isPEI()
*/
public boolean isPEI() {
return true;
}

View File

@ -15,17 +15,18 @@ package com.ibm.wala.shrikeBT;
* the operand.
*/
public final class UnaryOpInstruction extends Instruction {
public interface IOperator {}
public interface IOperator {
}
public static enum Operator implements IOperator {
NEG;
@Override
public String toString() {
return super.toString().toLowerCase();
return super.toString().toLowerCase();
}
}
protected UnaryOpInstruction(short opcode) {
this.opcode = opcode;
}
@ -87,7 +88,7 @@ public final class UnaryOpInstruction extends Instruction {
}
@Override
public void visit(Visitor v) throws NullPointerException {
public void visit(Visitor v) throws NullPointerException {
v.visitUnaryOp(this);
}
@ -95,9 +96,7 @@ public final class UnaryOpInstruction extends Instruction {
public String toString() {
return "UnaryOp(" + getType() + "," + getOperator() + ")";
}
/* (non-Javadoc)
* @see com.ibm.domo.cfg.IInstruction#isPEI()
*/
public boolean isPEI() {
return false;
}