/** * Is this a 'static' call? (invokestatic in Java) */ public boolean isStatic() { return getCallSite().isStatic(); }
/** * Is this a 'static' call? (invokestatic in Java) */ public boolean isStatic() { return getCallSite().isStatic(); }
private CrossProductRec(InstanceKey[][] invariants, SSAAbstractInvokeInstruction call, CGNode caller, Consumer<InstanceKey[]> f) { this.invariants = invariants; this.f = f; this.call = call; this.caller = caller; this.site = call.getCallSite(); this.params = IntSetUtil.toArray(getRelevantParameters(caller, site)); this.keys = new InstanceKey[ params.length ]; }
/** * return the set of all PARAM_CALLER and HEAP_PARAM_CALLER statements associated with a given call */ public Set<Statement> getCallerParamStatements(SSAAbstractInvokeInstruction call) throws IllegalArgumentException { if (call == null) { throw new IllegalArgumentException("call == null"); } populate(); return callerParamStatements.get(call.getCallSite()); }
/** * Might this call dispatch to one of several possible methods? i.e., in Java, is it an invokeinterface or invokevirtual */ public boolean isDispatch() { return getCallSite().isDispatch(); }
private CrossProductRec(InstanceKey[][] invariants, SSAAbstractInvokeInstruction call, CGNode caller, Consumer<InstanceKey[]> f) { this.invariants = invariants; this.f = f; this.call = call; this.caller = caller; this.site = call.getCallSite(); this.params = IntSetUtil.toArray(getRelevantParameters(caller, site)); this.keys = new InstanceKey[ params.length ]; }
/** * return the set of all PARAM_CALLER and HEAP_PARAM_CALLER statements associated with a given call */ public Set<Statement> getCallerParamStatements(SSAAbstractInvokeInstruction call) throws IllegalArgumentException { if (call == null) { throw new IllegalArgumentException("call == null"); } populate(); return callerParamStatements.get(call.getCallSite()); }
/** * Is this a 'special' call? (invokespecial in Java) */ public boolean isSpecial() { return getCallSite().isSpecial(); }
/** * return the set of all NORMAL_RETURN_CALLER and HEAP_RETURN_CALLER statements associated with a given call. */ public Set<Statement> getCallerReturnStatements(SSAAbstractInvokeInstruction call) throws IllegalArgumentException { if (call == null) { throw new IllegalArgumentException("call == null"); } populate(); return callerReturnStatements.get(call.getCallSite()); }
/** * Is this a 'special' call? (invokespecial in Java) */ public boolean isSpecial() { return getCallSite().isSpecial(); }
/** * return the set of all NORMAL_RETURN_CALLER and HEAP_RETURN_CALLER statements associated with a given call. */ public Set<Statement> getCallerReturnStatements(SSAAbstractInvokeInstruction call) throws IllegalArgumentException { if (call == null) { throw new IllegalArgumentException("call == null"); } populate(); return callerReturnStatements.get(call.getCallSite()); }
/** * return the set of all PARAM_CALLER, HEAP_PARAM_CALLER, and NORMAL statements (i.e., the actual call statement) associated with * a given call */ public Set<Statement> getCallStatements(SSAAbstractInvokeInstruction call) throws IllegalArgumentException { Set<Statement> callerParamStatements = getCallerParamStatements(call); Set<Statement> result = HashSetFactory.make(callerParamStatements.size() + 1); result.addAll(callerParamStatements); result.add(callSite2Statement.get(call.getCallSite())); return result; }
/** * return the set of all PARAM_CALLER, HEAP_PARAM_CALLER, and NORMAL statements (i.e., the actual call statement) associated with * a given call */ public Set<Statement> getCallStatements(SSAAbstractInvokeInstruction call) throws IllegalArgumentException { Set<Statement> callerParamStatements = getCallerParamStatements(call); Set<Statement> result = HashSetFactory.make(callerParamStatements.size() + 1); result.addAll(callerParamStatements); result.add(callSite2Statement.get(call.getCallSite())); return result; }
@Override public boolean throwsException(final SSAAbstractInvokeInstruction node) { for (final CGNode called : cg.getPossibleTargets(method, node.getCallSite())) { final IntraprocAnalysisState info = map.get(called); if (info == null || info.hasExceptions()) { return true; } } return false; }
@Override public boolean throwsException(final SSAAbstractInvokeInstruction node) { for (final CGNode called : cg.getPossibleTargets(method, node.getCallSite())) { final IntraprocAnalysisState info = map.get(called); if (info == null || info.hasExceptions()) { return true; } } return false; }
@Override public CallSiteReference next() { int index = callSiteMapping.getRelated(i).max(); advance(); return ((SSAAbstractInvokeInstruction) instructions[index]).getCallSite(); }
@Override public CallSiteReference next() { int index = callSiteMapping.getRelated(i).max(); advance(); return ((SSAAbstractInvokeInstruction) instructions[index]).getCallSite(); }
/** * @return the set of all locations read by any callee at a call site. */ private static OrdinalSet<PointerKey> unionHeapLocations(CallGraph cg, CGNode n, SSAAbstractInvokeInstruction call, Map<CGNode, OrdinalSet<PointerKey>> loc) { BitVectorIntSet bv = new BitVectorIntSet(); for (CGNode t : cg.getPossibleTargets(n, call.getCallSite())) { bv.addAll(loc.get(t).getBackingSet()); } return new OrdinalSet<>(bv, loc.get(n).getMapping()); }
/** * get the {@link CallSiteReference} corresponding to the last instruction in B (assumed to be a call) */ protected CallSiteReference getCallSiteForCallBlock(IBasicBlock<SSAInstruction> B, ControlFlowGraph<SSAInstruction, T> cfg) { SSAInstruction[] statements = cfg.getInstructions(); SSAAbstractInvokeInstruction call = (SSAAbstractInvokeInstruction) statements[B.getLastInstructionIndex()]; int pc = cfg.getProgramCounter(B.getLastInstructionIndex()); CallSiteReference site = call.getCallSite(); assert site.getProgramCounter() == pc; return site; }
/** * get the {@link CallSiteReference} corresponding to the last instruction in B (assumed to be a call) */ protected CallSiteReference getCallSiteForCallBlock(IBasicBlock<SSAInstruction> B, ControlFlowGraph<SSAInstruction, T> cfg) { SSAInstruction[] statements = cfg.getInstructions(); SSAAbstractInvokeInstruction call = (SSAAbstractInvokeInstruction) statements[B.getLastInstructionIndex()]; int pc = cfg.getProgramCounter(B.getLastInstructionIndex()); CallSiteReference site = call.getCallSite(); assert site.getProgramCounter() == pc; return site; }