if (instr instanceof SSAReturnInstruction) { SSAReturnInstruction retInstr = (SSAReturnInstruction) instr; if (ir.getSymbolTable().isNullConstant(retInstr.getResult())) { LOG(DEBUG, "DEBUG", "Nullable return in method: " + method.getSignature()); return NullnessHint.NULLABLE;
@Override public void visitReturn(SSAReturnInstruction instruction) { try { Element elt = doc.createElement(XMLSummaryWriter.E_RETURN); if (!instruction.returnsVoid()) { String localName = getLocalName(instruction.getResult()); elt.setAttribute(XMLSummaryWriter.A_VALUE, localName); } summary.add(elt); } catch (Exception e) { throw new SSASerializationException(e); } }
@Override public void visitReturn(SSAReturnInstruction ret) { Vertex v = factory.makeVarVertex(func, ret.getResult()), w = factory.makeRetVertex(func); flowgraph.addEdge(v, w); }
@Override public void visitReturn(SSAReturnInstruction ret) { Vertex v = factory.makeVarVertex(func, ret.getResult()), w = factory.makeRetVertex(func); flowgraph.addEdge(v, w); }
private boolean returnsThis(IMethod method) { MethodReference mref = method.getReference(); if(method.getNumberOfParameters() < 1) return false; Boolean b = returnsThis_cache.get(mref); if(b != null) return b; for(SSAInstruction inst : factory.makeIR(method, Everywhere.EVERYWHERE, SSAOptions.defaultOptions()).getInstructions()) { if(inst instanceof SSAReturnInstruction) { SSAReturnInstruction ret = (SSAReturnInstruction)inst; if(ret.getResult() == 2) { returnsThis_cache.put(mref, true); return true; } } } returnsThis_cache.put(mref, false); return false; }
private boolean returnsThis(IMethod method) { MethodReference mref = method.getReference(); if(method.getNumberOfParameters() < 1) return false; Boolean b = returnsThis_cache.get(mref); if(b != null) return b; for(SSAInstruction inst : factory.makeIR(method, Everywhere.EVERYWHERE, SSAOptions.defaultOptions()).getInstructions()) { if(inst instanceof SSAReturnInstruction) { SSAReturnInstruction ret = (SSAReturnInstruction)inst; if(ret.getResult() == 2) { returnsThis_cache.put(mref, true); return true; } } } returnsThis_cache.put(mref, false); return false; }
@Override public void visitReturn(SSAReturnInstruction instruction) { // skip returns of primitive type if (instruction.returnsPrimitiveType() || instruction.returnsVoid()) { return; } if (DEBUG) { System.err.println("visitReturn: " + instruction); } PointerKey returnValue = getPointerKeyForReturnValue(); PointerKey result = getPointerKeyForLocal(instruction.getResult()); if (contentsAreInvariant(symbolTable, du, instruction.getResult())) { system.recordImplicitPointsToSet(result); InstanceKey[] ik = getInvariantContents(instruction.getResult()); for (InstanceKey element : ik) { if (DEBUG) { System.err.println("invariant contents: " + returnValue + ' ' + element); } system.newConstraint(returnValue, element); } } else { system.newConstraint(returnValue, assignOperator, result); } }
@Override public void visitReturn(SSAReturnInstruction instruction) { // skip returns of primitive type if (instruction.returnsPrimitiveType() || instruction.returnsVoid()) { return; } if (DEBUG) { System.err.println("visitReturn: " + instruction); } PointerKey returnValue = getPointerKeyForReturnValue(); PointerKey result = getPointerKeyForLocal(instruction.getResult()); if (contentsAreInvariant(symbolTable, du, instruction.getResult())) { system.recordImplicitPointsToSet(result); InstanceKey[] ik = getInvariantContents(instruction.getResult()); for (InstanceKey element : ik) { if (DEBUG) { System.err.println("invariant contents: " + returnValue + ' ' + element); } system.newConstraint(returnValue, element); } } else { system.newConstraint(returnValue, assignOperator, result); } }
@Override public void visitReturn(SSAReturnInstruction instruction) { // skip returns of primitive type if (instruction.returnsVoid()) { return; } else { // just make a node for the def'd value PointerKey def = heapModel.getPointerKeyForLocal(node, instruction.getResult()); addNode(def); PointerKey returnValue = heapModel.getPointerKeyForReturnValue(node); addNode(returnValue); addEdge(returnValue, def, AssignLabel.noFilter()); } }
@Override public void visitReturn(SSAReturnInstruction instruction) { // skip returns of primitive type if (instruction.returnsVoid()) { return; } else { // just make a node for the def'd value PointerKey def = heapModel.getPointerKeyForLocal(node, instruction.getResult()); addNode(def); PointerKey returnValue = heapModel.getPointerKeyForReturnValue(node); addNode(returnValue); addEdge(returnValue, def, AssignLabel.noFilter()); } }
@Override public void visitReturn(SSAReturnInstruction instruction) { // skip returns of primitive type if (instruction.returnsPrimitiveType() || instruction.returnsVoid()) { return; } else { // just make a node for the def'd value PointerKey def = heapModel.getPointerKeyForLocal(node, instruction.getResult()); g.addNode(def); PointerKey returnValue = heapModel.getPointerKeyForReturnValue(node); g.addNode(returnValue); g.addEdge(returnValue, def, AssignLabel.noFilter()); } }
@Override public void visitReturn(SSAReturnInstruction instruction) { // skip returns of primitive type if (instruction.returnsPrimitiveType() || instruction.returnsVoid()) { return; } else { // just make a node for the def'd value PointerKey def = heapModel.getPointerKeyForLocal(node, instruction.getResult()); g.addNode(def); PointerKey returnValue = heapModel.getPointerKeyForReturnValue(node); g.addNode(returnValue); g.addEdge(returnValue, def, AssignLabel.noFilter()); } }
final int ssaVal = returnInst.getResult(); final ReturnFlow<IExplodedBasicBlock> sinkFlow = new ReturnFlow<>( exitBlock, false);
@Override public void visitReturn(SSAReturnInstruction instruction) { // skip returns of primitive type if (instruction.returnsPrimitiveType() || instruction.returnsVoid()) { return; } else { // just make a node for the def'd value PointerKey def = heapModel.getPointerKeyForLocal(node, instruction.getResult()); addNode(def); PointerKey returnValue = heapModel.getPointerKeyForReturnValue(node); addNode(returnValue); addEdge(returnValue, def); } // PointerKey returnValue = getPointerKeyForReturnValue(node); // PointerKey result = getPointerKeyForLocal(node, // instruction.getResult()); // // if (!supportFullPointerFlowGraph && // // contentsAreInvariant(instruction.getResult())) { // if (contentsAreInvariant(symbolTable, du, instruction.getResult())) { // system.recordImplicitPointsToSet(result); // InstanceKey[] ik = getInvariantContents(symbolTable, du, node, // instruction.getResult(), SSAPropagationCallGraphBuilder.this); // for (int i = 0; i < ik.length; i++) { // system.newConstraint(returnValue, ik[i]); // } // } else { // system.newConstraint(returnValue, assignOperator, result); // } }
@Override public void visitReturn(SSAReturnInstruction instruction) { // skip returns of primitive type if (instruction.returnsPrimitiveType() || instruction.returnsVoid()) { return; } else { // just make a node for the def'd value PointerKey def = heapModel.getPointerKeyForLocal(node, instruction.getResult()); addNode(def); PointerKey returnValue = heapModel.getPointerKeyForReturnValue(node); addNode(returnValue); addEdge(returnValue, def); } // PointerKey returnValue = getPointerKeyForReturnValue(node); // PointerKey result = getPointerKeyForLocal(node, // instruction.getResult()); // // if (!supportFullPointerFlowGraph && // // contentsAreInvariant(instruction.getResult())) { // if (contentsAreInvariant(symbolTable, du, instruction.getResult())) { // system.recordImplicitPointsToSet(result); // InstanceKey[] ik = getInvariantContents(symbolTable, du, node, // instruction.getResult(), SSAPropagationCallGraphBuilder.this); // for (int i = 0; i < ik.length; i++) { // system.newConstraint(returnValue, ik[i]); // } // } else { // system.newConstraint(returnValue, assignOperator, result); // } }