Skip to content

Commit baf92f5

Browse files
committed
Drop noreturn
1 parent c05f73c commit baf92f5

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

document/core/util/macros.def

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -717,8 +717,6 @@
717717
.. |CLABELS| mathdef:: \xref{valid/conventions}{context}{\K{labels}}
718718
.. |CRETURN| mathdef:: \xref{valid/conventions}{context}{\K{return}}
719719

720-
.. |NORETURN| mathdef:: \xref{valid/conventions}{context}{\K{noreturn}}
721-
722720

723721
.. Judgments
724722

document/core/valid/conventions.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ which collects relevant information about the surrounding :ref:`module <syntax-m
4040
* *Globals*: the list of globals declared in the current module, represented by their global type.
4141
* *Locals*: the list of locals declared in the current function (including parameters), represented by their value type.
4242
* *Labels*: the stack of labels accessible from the current position, represented by their result type.
43-
* *Return*: the return type of the current function, represented as a result type, or a special marker |NORETURN| indicating that no return is allowed, as in free-standing expressions.
43+
* *Return*: the return type of the current function, represented as an optional result type that is absent when no return is allowed, as in free-standing expressions.
4444

4545
In other words, a context contains a sequence of suitable :ref:`types <syntax-type>` for each :ref:`index space <syntax-index>`,
4646
describing each defined entry in that space.
@@ -60,14 +60,13 @@ More concretely, contexts are defined as :ref:`records <notation-record>` :math:
6060
& \CGLOBALS & \globaltype^\ast, \\
6161
& \CLOCALS & \valtype^\ast, \\
6262
& \CLABELS & \resulttype^\ast, \\
63-
& \CRETURN & (\resulttype ~|~ \NORETURN) ~\} \\
63+
& \CRETURN & \resulttype^? ~\} \\
6464
\end{array}
6565
\end{array}
6666
6767
In addition to field access written :math:`C.\K{field}` the following notation is adopted for manipulating contexts:
6868

6969
* When spelling out a context, empty fields are omitted.
70-
Likewise, the |CRETURN| field may be omitted when it is |NORETURN|.
7170

7271
* The notation :math:`\K{field}\,A^\ast, C` denotes the same context as :math:`C` but with the elements :math:`A^\ast` prepended to its :math:`\K{field}` component sequence.
7372

document/core/valid/instructions.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ Control Instructions
616616
:math:`\RETURN`
617617
...............
618618

619-
* The return type :math:`C.\CRETURN` must not be |NORETURN| in the context.
619+
* The return type :math:`C.\CRETURN` must not be absent in the context.
620620

621621
* Let :math:`[t^?]` be the :ref:`result type <syntax-resulttype>` of :math:`C.\CRETURN`.
622622

@@ -632,7 +632,9 @@ Control Instructions
632632
.. note::
633633
The |RETURN| instruction is :ref:`stack-polymorphic <polymorphism>`.
634634

635-
:math:`C.\CRETURN` is |NORETURN| when validating an :ref:`expression <valid-expr>` that is not a function body.
635+
:math:`C.\CRETURN` is absent (set to :math:`\epsilon`) when validating an :ref:`expression <valid-expr>` that is not a function body.
636+
This differs from it being set to the empty result type (:math:`[\epsilon]`),
637+
which is the case for functions not returning anything.
636638

637639

638640
.. _valid-call:

document/core/valid/modules.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,9 +469,9 @@ Instead, the context :math:`C` for validation of the module's content is constru
469469

470470
* :math:`C.\CLABELS` is empty,
471471

472-
* :math:`C.\CRETURN` is |NORETURN|.
472+
* :math:`C.\CRETURN` is empty.
473473

474-
* Let :math:`C'` be the :ref:`context <context>` where :math:`C'.\CGLOBALS` is the sequence :math:`\etglobals(\externtype_i^\ast)`, :math:`C.\CRETURN` is |NORETURN| and all other fields are empty.
474+
* Let :math:`C'` be the :ref:`context <context>` where :math:`C'.\CGLOBALS` is the sequence :math:`\etglobals(\externtype_i^\ast)` and all other fields are empty.
475475

476476
* Under the context :math:`C`:
477477

0 commit comments

Comments
 (0)