@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; final ParamBarLabel other = (ParamBarLabel) obj; if (callSite == null) { if (other.callSite != null) return false; } else if (!callSite.equals(other.callSite)) return false; return true; }
@Override public ContextItem get(ContextKey name) { if (name == null) { throw new IllegalArgumentException("name is null"); } if (name.equals(ContextKey.CALLER) || name.equals(ContextKey.CALLSITE)) { return super.get(name); } else { return baseContext.get(name); } }
@Override public boolean shouldRefine(CallerSiteContext callSiteAndCGNode) throws IllegalArgumentException { if (callSiteAndCGNode == null) { throw new IllegalArgumentException("callSiteAndCGNode == null"); } MethodReference declaredTarget = callSiteAndCGNode.getCallSite().getDeclaredTarget(); if (declaredTarget.toString().indexOf("toString()Ljava/lang/String") != -1) { return false; } return true; }
final int paramPos = localPk.getValueNumber() - 1; for (final CallerSiteContext callSiteAndCGNode : g.getPotentialCallers(localPk)) { final CGNode caller = callSiteAndCGNode.getCaller(); final CallSiteReference call = callSiteAndCGNode.getCallSite(); CallerSiteContext callSiteAndCGNode = new CallerSiteContext(caller, callSiteRef); queryCallTargets(callSiteAndCGNode, getCallInstrs(caller, callSiteAndCGNode.getCallSite()), curPkAndState.getState());
@Override public Context getCalleeTarget(CGNode caller, CallSiteReference site, IMethod callee, InstanceKey[] receiver) { Context baseContext = baseSelector.getCalleeTarget(caller, site, callee, receiver); if (baseContext.equals(Everywhere.EVERYWHERE)) { return new CallerSiteContext(caller, site); } else { return new CallerSiteContextPair(caller, site, baseContext); } }
@Override public int hashCode() { final int PRIME = 31; int result = 1; result = PRIME * result + ((callSite == null) ? 0 : callSite.hashCode()); return result; }
@Override public String toString() { return super.toString() + ",Base:" + baseContext; }
final CGNode caller = callSiteAndCGNode.getCaller(); if (hasNullIR(caller)) continue; final CallSiteReference call = callSiteAndCGNode.getCallSite(); if (calleeSubGraphMissingAndShouldNotBeAdded(addGraphs, callee, curPkAndState)) { continue; continue; CallSiteReference callSiteRef = callInstr.getCallSite(); CallerSiteContext callSiteAndCGNode = new CallerSiteContext(caller, callSiteRef); queryCallTargets(callSiteAndCGNode, getCallInstrs(caller, callSiteAndCGNode.getCallSite()), curState);
@Override public Context getCalleeTarget(CGNode caller, CallSiteReference site, IMethod callee, InstanceKey[] receiver) { Context baseContext = baseSelector.getCalleeTarget(caller, site, callee, receiver); if (baseContext.equals(Everywhere.EVERYWHERE)) { return new CallerSiteContext(caller, site); } else { return new CallerSiteContextPair(caller, site, baseContext); } }
@Override public int hashCode() { final int PRIME = 31; int result = 1; result = PRIME * result + ((callSite == null) ? 0 : callSite.hashCode()); return result; }
@Override public String toString() { return super.toString() + ",Base:" + baseContext; }
final CGNode caller = callSiteAndCGNode.getCaller(); if (hasNullIR(caller)) continue; final CallSiteReference call = callSiteAndCGNode.getCallSite(); if (calleeSubGraphMissingAndShouldNotBeAdded(addGraphs, callee, curPkAndState)) { continue; continue; CallSiteReference callSiteRef = callInstr.getCallSite(); CallerSiteContext callSiteAndCGNode = new CallerSiteContext(caller, callSiteRef); queryCallTargets(callSiteAndCGNode, getCallInstrs(caller, callSiteAndCGNode.getCallSite()), curState);
@Override public Set<CallerSiteContext> getPotentialCallers(PointerKey formalPk) { CGNode callee = null; if (formalPk instanceof LocalPointerKey) { callee = ((LocalPointerKey) formalPk).getNode(); } else if (formalPk instanceof ReturnValueKey) { callee = ((ReturnValueKey) formalPk).getNode(); } else { throw new IllegalArgumentException("formalPk must represent a local"); } Set<CallerSiteContext> ret = callerCache.get(callee); if (ret == null) { ret = HashSetFactory.make(); for (CGNode caller : Iterator2Iterable.make(cg.getPredNodes(callee))) { for (CallSiteReference call : Iterator2Iterable.make(cg.getPossibleSites(caller, callee))) { ret.add(new CallerSiteContext(caller, call)); } } callerCache.put(callee, ret); } return ret; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; final ParamBarLabel other = (ParamBarLabel) obj; if (callSite == null) { if (other.callSite != null) return false; } else if (!callSite.equals(other.callSite)) return false; return true; }
final CGNode caller = callSiteAndCGNode.getCaller(); for (SSAAbstractInvokeInstruction callInstr : callInstrs) { PointerKey thisArg = heapModel.getPointerKeyForLocal(caller, callInstr.getUse(0));
@Override public int hashCode() { return super.hashCode() + baseContext.hashCode(); }
@Override public boolean shouldRefine(CallerSiteContext callSiteAndCGNode) throws IllegalArgumentException { if (callSiteAndCGNode == null) { throw new IllegalArgumentException("callSiteAndCGNode == null"); } MethodReference declaredTarget = callSiteAndCGNode.getCallSite().getDeclaredTarget(); if (declaredTarget.toString().indexOf("toString()Ljava/lang/String") != -1) { return false; } return true; }
@Override public ContextItem get(ContextKey name) { if (name == null) { throw new IllegalArgumentException("name is null"); } if (name.equals(ContextKey.CALLER) || name.equals(ContextKey.CALLSITE)) { return super.get(name); } else { return baseContext.get(name); } }