diff --git a/document/core/valid/instructions.rst b/document/core/valid/instructions.rst index dc5efe55..b6ab410a 100644 --- a/document/core/valid/instructions.rst +++ b/document/core/valid/instructions.rst @@ -1415,8 +1415,14 @@ Control Instructions :math:`\TRY~\blocktype~\instr^\ast~\DELEGATE~l` ............................................... -.. todo:: - Add prose. +* The label :math:`C.\CLABELS[l]` must be defined in the context. + +* The :ref:`block type ` must be :ref:`valid ` as some :ref:`function type ` :math:`[t_1^\ast] \to [t_2^\ast]`. + +* Let :math:`C'` be the same :ref:`context ` as :math:`C`, but with the :ref:`result type ` :math:`[t_2^\ast]` prepended to the |CLABELS| vector. + +* Under context :math:`C'`, + the instruction sequence :math:`\instr^\ast` must be :ref:`valid ` with type :math:`[t_1^\ast] \to [t_2^\ast]`. .. math:: \frac{ @@ -1424,11 +1430,14 @@ Control Instructions \qquad C,\CLABELS\,[t_2^\ast] \vdashinstrseq \instr^\ast : [t_1^\ast]\to[t_2^\ast] \qquad - C.\CLABELS[l] = [t^\ast] + C.\CLABELS[l] = [t_0^\ast] }{ C \vdashinstrseq \TRY~\blocktype~\instr^\ast~\DELEGATE~l : [t_1^\ast]\to[t_2^\ast] } +.. note:: + The :ref:`label index ` space in the :ref:`context ` :math:`C` contains the most recent label first, so that :math:`C.\CLABELS[l]` performs a relative lookup as expected. + .. _valid-throw: