public LiveLocalStoreAnalysis(MethodGen methodGen, ReverseDepthFirstSearch rdfs, DepthFirstSearch dfs) { super(rdfs, dfs); this.topBit = methodGen.getMaxLocals() * 2; this.killedByStoreOffset = methodGen.getMaxLocals(); }
@Override public IsNullValueFrame createFact() { return new IsNullValueFrame(methodGen.getMaxLocals(), trackValueNumbers); }
@Override public TypeFrame createFact() { return new TypeFrame(methodGen.getMaxLocals()); }
@Override public ConstantFrame createFact() { return new ConstantFrame(methodGen.getMaxLocals()); }
@Override public ValueNumberFrame createFact() { return new ValueNumberFrame(methodGen.getMaxLocals()); }
@Override public ResourceValueFrame createFact() { ResourceValueFrame fact = new ResourceValueFrame(methodGen.getMaxLocals()); fact.setTop(); return fact; }
public void setMaxLocals() { // Get the current number of local variable slots int maxLocals = super.getMaxLocals(); // Get numer of actual variables final LocalVariableGen[] localVars = super.getLocalVariables(); if (localVars != null) { if (localVars.length > maxLocals) maxLocals = localVars.length; } // We want at least 5 local variable slots (for parameters) if (maxLocals < 5) maxLocals = 5; super.setMaxLocals(maxLocals); }
@Override public void initEntryFact(TypeFrame result) { super.initEntryFact(result); for (int i = 0; i < methodGen.getMaxLocals(); i++) { Type t = result.getValue(i); if (t.equals(Type.STRING)) { result.setValue(i, parameterStringTypeInstance); } } } }
public ValueNumberAnalysis(MethodGen methodGen, DepthFirstSearch dfs, LoadedFieldSet loadedFieldSet, RepositoryLookupFailureCallback lookupFailureCallback) { super(dfs); this.methodGen = methodGen; this.factory = new ValueNumberFactory(); ValueNumberCache cache = new ValueNumberCache(); this.visitor = new ValueNumberFrameModelingVisitor(methodGen, factory, cache, loadedFieldSet, lookupFailureCallback); int numLocals = methodGen.getMaxLocals(); this.entryLocalValueList = new ValueNumber[numLocals]; for (int i = 0; i < numLocals; ++i) { this.entryLocalValueList[i] = factory.createFreshValue(); } this.exceptionHandlerValueNumberMap = new IdentityHashMap<>(); // For non-static methods, keep track of which value represents the // "this" reference if (!methodGen.isStatic()) { this.thisValue = entryLocalValueList[0]; } this.factAtLocationMap = new HashMap<>(); this.factAfterLocationMap = new HashMap<>(); if (DEBUG) { System.out.println("VNA Analysis " + methodGen.getClassName() + "." + methodGen.getName() + " : " + methodGen.getSignature()); } }
while (slot < methodGen.getMaxLocals()) { result.setValue(slot++, TypeFrame.getBottomType());
cachedEntryFact.setValid(); int numLocals = methodGen.getMaxLocals(); boolean instanceMethod = !methodGen.isStatic(); XMethod xm = XFactory.createXMethod(methodGen.getClassName(), methodGen.getName(), methodGen.getSignature(),
public LiveLocalStoreAnalysis(MethodGen methodGen, ReverseDepthFirstSearch rdfs, DepthFirstSearch dfs) { super(rdfs, dfs); this.topBit = methodGen.getMaxLocals() * 2; this.killedByStoreOffset = methodGen.getMaxLocals(); }
@Override public TaintFrame createFact() { return new TaintFrame(methodGen.getMaxLocals()); }
@Override public ValueNumberFrame createFact() { return new ValueNumberFrame(methodGen.getMaxLocals()); }
@Override public TypeFrame createFact() { return new TypeFrame(methodGen.getMaxLocals()); }
@Override public ConstantFrame createFact() { return new ConstantFrame(methodGen.getMaxLocals()); }
@Override public IsNullValueFrame createFact() { return new IsNullValueFrame(methodGen.getMaxLocals(), trackValueNumbers); }
@Override public ResourceValueFrame createFact() { ResourceValueFrame fact = new ResourceValueFrame(methodGen.getMaxLocals()); fact.setTop(); return fact; }
public void setMaxLocals() { // Get the current number of local variable slots int maxLocals = super.getMaxLocals(); // Get numer of actual variables final LocalVariableGen[] localVars = super.getLocalVariables(); if (localVars != null) { if (localVars.length > maxLocals) maxLocals = localVars.length; } // We want at least 5 local variable slots (for parameters) if (maxLocals < 5) maxLocals = 5; super.setMaxLocals(maxLocals); }
@Override public void initEntryFact(TypeFrame result) { super.initEntryFact(result); for (int i = 0; i < methodGen.getMaxLocals(); i++) { Type t = result.getValue(i); if (t.equals(Type.STRING)) { result.setValue(i, parameterStringTypeInstance); } } } }