AnalysisCache -> IAnalysisCache, additional ignore, increased visibility, generic fixes (#172)
* Use IAnalysisCacheView instead of AnalysisCache. (#1)
It seems that some additional types need to be changed due to
d24519e974
. This may not be inclusive,
however.
* Increase visibility of several methods and constructors.
Used for creating custom contexts and context selectors.
* Ignore the results directory.
* Some generic type fixes in ModRef.java.
This commit is contained in:
parent
589db13fa7
commit
97a6496c1f
|
@ -42,3 +42,4 @@ com.ibm.wala.dalvik.test/data/sample.cup
|
||||||
com.ibm.wala.dalvik.test/parser.java
|
com.ibm.wala.dalvik.test/parser.java
|
||||||
com.ibm.wala.dalvik.test/report
|
com.ibm.wala.dalvik.test/report
|
||||||
com.ibm.wala.dalvik.test/sym.java
|
com.ibm.wala.dalvik.test/sym.java
|
||||||
|
results
|
|
@ -27,7 +27,7 @@ public class CallString implements ContextItem {
|
||||||
this.methods = new IMethod[] { method };
|
this.methods = new IMethod[] { method };
|
||||||
}
|
}
|
||||||
|
|
||||||
CallString(CallSiteReference site, IMethod method, int length, CallString base) {
|
protected CallString(CallSiteReference site, IMethod method, int length, CallString base) {
|
||||||
int sitesLength = Math.min(length, base.sites.length + 1);
|
int sitesLength = Math.min(length, base.sites.length + 1);
|
||||||
int methodsLength = Math.min(length, base.methods.length + 1);
|
int methodsLength = Math.min(length, base.methods.length + 1);
|
||||||
sites = new CallSiteReference[sitesLength];
|
sites = new CallSiteReference[sitesLength];
|
||||||
|
|
|
@ -35,7 +35,7 @@ public abstract class CallStringContextSelector implements ContextSelector {
|
||||||
|
|
||||||
private final Context base;
|
private final Context base;
|
||||||
|
|
||||||
private CallStringContextPair(CallString cs, Context base) {
|
public CallStringContextPair(CallString cs, Context base) {
|
||||||
this.cs = cs;
|
this.cs = cs;
|
||||||
this.base = base;
|
this.base = base;
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@ public abstract class CallStringContextSelector implements ContextSelector {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
private final ContextSelector base;
|
protected final ContextSelector base;
|
||||||
|
|
||||||
public CallStringContextSelector(ContextSelector base) {
|
public CallStringContextSelector(ContextSelector base) {
|
||||||
this.base = base;
|
this.base = base;
|
||||||
|
@ -82,7 +82,7 @@ public abstract class CallStringContextSelector implements ContextSelector {
|
||||||
|
|
||||||
protected abstract int getLength(CGNode caller, CallSiteReference site, IMethod target);
|
protected abstract int getLength(CGNode caller, CallSiteReference site, IMethod target);
|
||||||
|
|
||||||
private CallString getCallString(CGNode caller, CallSiteReference site, IMethod target) {
|
protected CallString getCallString(CGNode caller, CallSiteReference site, IMethod target) {
|
||||||
int length = getLength(caller, site, target);
|
int length = getLength(caller, site, target);
|
||||||
if (length > 0) {
|
if (length > 0) {
|
||||||
if (caller.getContext().get(CALL_STRING) != null) {
|
if (caller.getContext().get(CALL_STRING) != null) {
|
||||||
|
|
|
@ -342,9 +342,9 @@ public class ModRef<T extends InstanceKey> {
|
||||||
return makeModVisitor(n, result, pa, h, false);
|
return makeModVisitor(n, result, pa, h, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected ModVisitor makeModVisitor(CGNode n, Collection<PointerKey> result, PointerAnalysis<T> pa, ExtendedHeapModel h,
|
protected ModVisitor<T,? extends ExtendedHeapModel> makeModVisitor(CGNode n, Collection<PointerKey> result, PointerAnalysis<T> pa, ExtendedHeapModel h,
|
||||||
boolean ignoreAllocHeapDefs) {
|
boolean ignoreAllocHeapDefs) {
|
||||||
return new ModVisitor<T, ExtendedHeapModel>(n, result, h, pa, ignoreAllocHeapDefs);
|
return new ModVisitor<>(n, result, h, pa, ignoreAllocHeapDefs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -368,7 +368,7 @@ public class ModRef<T extends InstanceKey> {
|
||||||
return hexcl == null ? result : hexcl.filter(result);
|
return hexcl == null ? result : hexcl.filter(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected RefVisitor makeRefVisitor(CGNode n, Collection<PointerKey> result, PointerAnalysis<T> pa, ExtendedHeapModel h) {
|
protected RefVisitor<T, ExtendedHeapModel> makeRefVisitor(CGNode n, Collection<PointerKey> result, PointerAnalysis<T> pa, ExtendedHeapModel h) {
|
||||||
return new RefVisitor<T, ExtendedHeapModel>(n, result, pa, h);
|
return new RefVisitor<T, ExtendedHeapModel>(n, result, pa, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue