minor changes: remove debug code and sync with main branch
This commit is contained in:
parent
eb9e74f442
commit
7769c5b126
|
@ -1060,22 +1060,12 @@ public abstract class SSAPropagationCallGraphBuilder extends PropagationCallGrap
|
|||
params = IntSetUtil.makeMutableCopy(params);
|
||||
((MutableIntSet)params).add(0);
|
||||
}
|
||||
final IntSet paramsDebug = params;
|
||||
final int vns[] = new int[ params.size() ];
|
||||
params.foreach(new IntSetAction() {
|
||||
private int i = 0;
|
||||
@Override
|
||||
public void act(int x) {
|
||||
try {
|
||||
vns[i++] = instruction.getUse(x);
|
||||
} catch (ArrayIndexOutOfBoundsException e) {
|
||||
System.err.println("ArrayIndexOutOfBoundsException: i = " + i + " x = " + x + " instr = " + instruction);
|
||||
System.err.println("Params: " + paramsDebug);
|
||||
System.err.println("From ContextSelector: " + getBuilder().getContextSelector());
|
||||
System.err.println("In Node: " + node);
|
||||
e.printStackTrace();
|
||||
throw e;
|
||||
}
|
||||
vns[i++] = instruction.getUse(x);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ import com.ibm.wala.types.Descriptor;
|
|||
import com.ibm.wala.types.MethodReference;
|
||||
import com.ibm.wala.types.TypeName;
|
||||
import com.ibm.wala.types.TypeReference;
|
||||
import com.ibm.wala.util.debug.Assertions;
|
||||
import com.ibm.wala.util.intset.EmptyIntSet;
|
||||
import com.ibm.wala.util.intset.IntSet;
|
||||
import com.ibm.wala.util.intset.IntSetUtil;
|
||||
|
@ -118,6 +119,9 @@ public class ContainerContextSelector implements ContextSelector {
|
|||
if (isWellKnownStaticFactory(callee.getReference())) {
|
||||
return new CallerSiteContext(caller, site);
|
||||
} else {
|
||||
if (receiver == null) {
|
||||
Assertions.UNREACHABLE("null receiver for " + site);
|
||||
}
|
||||
return new ReceiverInstanceContext(receiver);
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -19,14 +19,14 @@ public abstract class SSAArrayReferenceInstruction extends SSAInstruction {
|
|||
|
||||
private final int arrayref;
|
||||
|
||||
private final int idx;
|
||||
private final int index;
|
||||
|
||||
private final TypeReference elementType;
|
||||
|
||||
SSAArrayReferenceInstruction(int iindex, int arrayref, int index, TypeReference elementType) {
|
||||
super(iindex);
|
||||
this.arrayref = arrayref;
|
||||
this.idx = index;
|
||||
this.index = index;
|
||||
this.elementType = elementType;
|
||||
if (elementType == null) {
|
||||
throw new IllegalArgumentException("null elementType");
|
||||
|
@ -47,7 +47,7 @@ public abstract class SSAArrayReferenceInstruction extends SSAInstruction {
|
|||
@Override
|
||||
public int getUse(int j) {
|
||||
assert j <= 1;
|
||||
return (j == 0) ? arrayref : idx;
|
||||
return (j == 0) ? arrayref : index;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -61,7 +61,7 @@ public abstract class SSAArrayReferenceInstruction extends SSAInstruction {
|
|||
* Return the value number of the index of the array reference.
|
||||
*/
|
||||
public int getIndex() {
|
||||
return idx;
|
||||
return index;
|
||||
}
|
||||
|
||||
public TypeReference getElementType() {
|
||||
|
|
Loading…
Reference in New Issue