Class SDGFormalOutNode


  • public class SDGFormalOutNode
    extends PDGNode
    System dependence graph node for a method's returned value at its exit; it uses the returned SSA value and defines nothing.
    • Constructor Detail

      • SDGFormalOutNode

        public SDGFormalOutNode​(int id,
                                SSAValue returnValue,
                                String returnType,
                                IRBlock exitBlock)
        Creates a formal-out node that is not yet linked to its entry node.
        Parameters:
        id - node id
        returnValue - SSA value returned, or null for a void method
        returnType - return descriptor, may be null
        exitBlock - the method's exit block
    • Method Detail

      • getEntryNode

        public SDGEntryNode getEntryNode()
        Returns:
        the entry node
      • setEntryNode

        public void setEntryNode​(SDGEntryNode entryNode)
        Links this return back to the entry node of its owning method.
        Parameters:
        entryNode - owning method's entry node
      • getReturnValue

        public SSAValue getReturnValue()
        Returns:
        the return value
      • getReturnType

        public String getReturnType()
        Returns:
        the return type
      • getLabel

        public String getLabel()
        Specified by:
        getLabel in class PDGNode
        Returns:
        a short human-readable description of what this node represents
      • getDefinedValue

        public SSAValue getDefinedValue()
        Specified by:
        getDefinedValue in class PDGNode
        Returns:
        the value this node defines, or null if it defines none
      • hasReturnValue

        public boolean hasReturnValue()
        Returns:
        true if an SSA value was bound as the returned value
      • isVoidReturn

        public boolean isVoidReturn()
        Returns:
        true if the return descriptor is "V" or was never recorded
      • getParameterName

        public String getParameterName()
        Returns:
        the returned SSA value's name, or "return" when no value is bound