Skip to content

Commit 5130369

Browse files
authored
[spec] Fix block values (#609)
1 parent c5958ed commit 5130369

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

document/core/exec/instructions.rst

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -964,24 +964,22 @@ Exiting :math:`\instr^\ast` with label :math:`L`
964964

965965
When the end of a block is reached without a jump or trap aborting it, then the following steps are performed.
966966

967-
1. Let :math:`n` be the arity of :math:`L`.
967+
1. Let :math:`m` be the number of values on the top of the stack.
968968

969-
2. Assert: due to :ref:`validation <valid-instr-seq>`, there are :math:`n` values on the top of the stack.
969+
2. Pop the values :math:`\val^m` from the stack.
970970

971-
3. Pop the results :math:`\val^n` from the stack.
971+
3. Assert: due to :ref:`validation <valid-instr-seq>`, the label :math:`L` is now on the top of the stack.
972972

973-
4. Assert: due to :ref:`validation <valid-instr-seq>`, the label :math:`L` is now on the top of the stack.
973+
4. Pop the label from the stack.
974974

975-
5. Pop the label from the stack.
975+
5. Push :math:`\val^m` back to the stack.
976976

977-
6. Push :math:`\val^n` back to the stack.
978-
979-
7. Jump to the position after the |END| of the :ref:`structured control instruction <syntax-instr-control>` associated with the label :math:`L`.
977+
6. Jump to the position after the |END| of the :ref:`structured control instruction <syntax-instr-control>` associated with the label :math:`L`.
980978

981979
.. math::
982980
~\\[-1ex]
983981
\begin{array}{lcl@{\qquad}l}
984-
\LABEL_n\{\instr^\ast\}~\val^n~\END &\stepto& \val^n
982+
\LABEL_n\{\instr^\ast\}~\val^m~\END &\stepto& \val^m
985983
\end{array}
986984
987985
.. note::

0 commit comments

Comments
 (0)