Class Return

    • Constructor Detail

      • Return

        public Return​(CFG cfg,
                      CodeLocation location,
                      Expression expression)
        Builds the return, returning expression to the caller CFG, happening at the given location in the program.
        Parameters:
        cfg - the cfg that this statement belongs to
        location - the location where this statement is defined within the source file. If unknown, use null
        expression - the expression to return
    • Method Detail

      • toString

        public final java.lang.String toString()
        Specified by:
        toString in class Statement
      • 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
      • getMetaVariable

        public final Identifier getMetaVariable()
        Description copied from interface: MetaVariableCreator
        Yields the meta variable that is introduced during the evaluation of the semantics of this object to store information about the value produced by this object. Since the meta variable simulates a value pushed on the stack, it should be forgotten after it is consumed.
        Specified by:
        getMetaVariable in interface MetaVariableCreator
        Returns:
        the meta variable introduced by this object