Define a return instruction.

It is possible to return multiple values from a function, so ReturnData contains
a VariableArgs instance.

We don't want return instructions to appear as 'return (v1)', so tweak the
printing of VariableArgs so the parantheses are added externally.
This commit is contained in:
Jakob Stoklund Olesen
2016-07-08 16:19:26 -07:00
parent a39e418d32
commit 520a438c42
7 changed files with 61 additions and 21 deletions

View File

@@ -393,16 +393,7 @@ preamble`:
:arg args...: Function arguments matching the signature of F.
:result a,b,...: Return values matching the signature of F.
.. inst:: return args...
Return from function.
Unconditionally transfer control to the calling function, passing the
provided return values.
:arg args: Return values. The list of return values must match the list of
return value types in the function signature.
:result: None. This is a terminator instruction.
.. autoinst:: x_return
This simple example illustrates direct function calls and signatures::