Class Ret

    • Constructor Detail

      • Ret

        public Ret​(CFG cfg,
                   CodeLocation location)
        Builds the return, happening at the given location in the program.
        Parameters:
        cfg - the cfg that this statement belongs to
        location - the location where the statement is defined within the program
    • Method Detail

      • stopsExecution

        public boolean stopsExecution()
        Description copied from class: Statement
        Whether or not this statement stops the execution of the containing cfg, either by throwing an error or returning a value. To distinguish error-raising halting statements and normal ones, use Statement.throwsError().
        Overrides:
        stopsExecution in class Statement
        Returns:
        true only if that condition holds
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class Statement
      • compareSameClass

        protected int compareSameClass​(Statement o)
        Description copied from class: Statement
        Auxiliary method for Statement.compareTo(Statement) that can safely assume that the two statements happen at the same CodeLocation and are instances of the same class.
        Specified by:
        compareSameClass in class Statement
        Parameters:
        o - the other statement
        Returns:
        a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object
      • toString

        public final java.lang.String toString()
        Specified by:
        toString in class Statement
      • accept

        public <V> boolean accept​(GraphVisitor<CFG,​Statement,​Edge,​V> visitor,
                                  V tool)
        Description copied from interface: Node
        Accepts the given GraphVisitor. Implementors of this method are responsible for invoking GraphVisitor.visit(Object, Graph, Node) on this node after Node.accept(GraphVisitor, Object) has been invoked on all nested nodes, if any. The visiting should stop at the first of such calls that return false.
        Type Parameters:
        V - the type of auxiliary tool that visitor can use
        Parameters:
        visitor - the visitor that is visiting the Graph containing this node
        tool - the auxiliary tool that visitor can use
        Returns:
        whether or not the visiting should stop when this call returns, as decided by the visitor itself