Skip to content

Commit f83a375

Browse files
authored
[spec] Add missing length condition to br_table prose (WebAssembly#1709)
1 parent 129f4e8 commit f83a375

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

document/core/valid/instructions.rst

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1412,17 +1412,22 @@ Control Instructions
14121412
...........................
14131413

14141414

1415-
* The label :math:`C.\CLABELS[l_N]` must be defined in the context.
1415+
* The :ref:`label <syntax-label>` :math:`C.\CLABELS[l_N]` must be defined in the context.
14161416

1417-
* For all :math:`l_i` in :math:`l^\ast`,
1417+
* For each :ref:`label <syntax-label>` :math:`l_i` in :math:`l^\ast`,
14181418
the label :math:`C.\CLABELS[l_i]` must be defined in the context.
14191419

14201420
* There must be a sequence :math:`t^\ast` of :ref:`operand types <syntax-opdtype>`, such that:
14211421

1422+
* The length of the sequence :math:`t^\ast` is the same as the length of the sequence :math:`C.\CLABELS[l_N]`.
1423+
14221424
* For each :ref:`operand type <syntax-opdtype>` :math:`t_j` in :math:`t^\ast` and corresponding type :math:`t'_{Nj}` in :math:`C.\CLABELS[l_N]`, :math:`t_j` :ref:`matches <match-opdtype>` :math:`t'_{Nj}`.
14231425

1424-
* For all :math:`l_i` in :math:`l^\ast`,
1425-
and for each :ref:`operand type <syntax-opdtype>` :math:`t_j` in :math:`t^\ast` and corresponding type :math:`t'_{ij}` in :math:`C.\CLABELS[l_i]`, :math:`t_j` :ref:`matches <match-opdtype>` :math:`t'_{ij}`.
1426+
* For each :ref:`label <syntax-label>` :math:`l_i` in :math:`l^\ast`:
1427+
1428+
* The length of the sequence :math:`t^\ast` is the same as the length of the sequence :math:`C.\CLABELS[l_i]`.
1429+
1430+
* For each :ref:`operand type <syntax-opdtype>` :math:`t_j` in :math:`t^\ast` and corresponding type :math:`t'_{ij}` in :math:`C.\CLABELS[l_i]`, :math:`t_j` :ref:`matches <match-opdtype>` :math:`t'_{ij}`.
14261431

14271432
* Then the instruction is valid with type :math:`[t_1^\ast~t^\ast~\I32] \to [t_2^\ast]`, for any sequences of :ref:`operand types <syntax-opdtype>` :math:`t_1^\ast` and :math:`t_2^\ast`.
14281433

0 commit comments

Comments
 (0)