Skip to content

Commit d793168

Browse files
committed
Add back lost text rule
1 parent 0d9b985 commit d793168

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed

document/core/syntax/types.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,8 +384,8 @@ The *minimum* of two address types is defined as the address type whose :ref:`bi
384384

385385
.. math::
386386
\begin{array}{llll}
387-
\atmin(\X{at}_1, \X{at}_2) &=& \X{at}_1 & (\iff |\X{at}_1| \leq |\X{at}_2|) \\
388-
\atmin(\X{at}_1, \X{at}_2) &=& \X{at}_2 & (\otherwise) \\
387+
\addrtypemin(\X{at}_1, \X{at}_2) &=& \X{at}_1 & (\iff |\X{at}_1| \leq |\X{at}_2|) \\
388+
\addrtypemin(\X{at}_1, \X{at}_2) &=& \X{at}_2 & (\otherwise) \\
389389
\end{array}
390390
391391

document/core/text/modules.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,17 @@ A table's initialization :ref:`expression <text-expr>` can be omitted, in which
304304
305305
An :ref:`element segment <text-elem>` can be given inline with a table definition, in which case its offset is :math:`0` and the :ref:`limits <text-limits>` of the :ref:`table type <text-tabletype>` are inferred from the length of the given segment:
306306

307+
.. math::
308+
\begin{array}{llclll}
309+
\production{module field} &
310+
\text{(}~\text{table}~~\Tid^?~~\Taddrtype^?~~\Treftype~~\text{(}~\text{elem}~~\expr^n{:}\Tvec(\Telemexpr)~\text{)}~\text{)} \quad\equiv \\ & \qquad
311+
\text{(}~\text{table}~~\Tid'~~\Taddrtype^?~~n~~n~~\Treftype~\text{)} \\ & \qquad
312+
\text{(}~\text{elem}~~\text{(}~\text{table}~~\Tid'~\text{)}~~\text{(}~\Taddrtype'\text{.const}~~\text{0}~\text{)}~~\Treftype~~\Tvec(\Telemexpr)~\text{)}
313+
\\ & \qquad\qquad
314+
(\iff \Tid^? \neq \epsilon \wedge \Tid' = \Tid^? \vee \Tid^? = \epsilon \wedge \Tid' \idfresh, \\ & \qquad\qquad
315+
\iff \Taddrtype? \neq \epsilon \wedge \Taddrtype' = \Taddrtype^? \vee \Taddrtype^? = \epsilon \wedge \Taddrtype' = \text{i32}) \\
316+
\end{array}
317+
307318
.. math::
308319
\begin{array}{llclll}
309320
\production{module field} &

document/core/util/macros.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@
301301

302302
.. Types, meta functions
303303

304+
.. |addrtypemin| mathdef:: \xref{syntax/types}{aux-addrtype-min}{\F{min}}
304305
.. |reftypediff| mathdef:: \xref{valid/conventions}{aux-reftypediff}{\setminus}
305306

306307
.. |rollrt| mathdef:: \xref{valid/conventions}{aux-roll-rectype}{\F{roll}}
@@ -311,7 +312,6 @@
311312
.. |unrollht| mathdef:: \xref{appendix/properties}{aux-unroll-heaptype}{\F{unroll}}
312313

313314
.. |unpacktype| mathdef:: \xref{syntax/types}{aux-unpacktype}{\F{unpack}}
314-
.. |atmin| mathdef:: \xref{syntax/types}{aux-addrtype-min}{\F{atmin}}
315315

316316
.. |etfuncs| mathdef:: \xref{syntax/types}{syntax-externtype}{\F{funcs}}
317317
.. |ettables| mathdef:: \xref{syntax/types}{syntax-externtype}{\F{tables}}

document/core/valid/instructions.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1510,7 +1510,7 @@ Table Instructions
15101510
\qquad
15111511
C \vdashreftypematch t_2 \matchesvaltype t_1
15121512
}{
1513-
C \vdashinstr \TABLECOPY~x~y : [\X{at}_1~\X{at}_2~\atmin(\X{at}_1, \X{at}_2)] \to []
1513+
C \vdashinstr \TABLECOPY~x~y : [\X{at}_1~\X{at}_2~\addrtypemin(\X{at}_1, \X{at}_2)] \to []
15141514
}
15151515
15161516
@@ -1898,7 +1898,7 @@ Memory Instructions
18981898
\qquad
18991899
C.\CMEMS[y] = \X{at}_y~\limits_y
19001900
}{
1901-
C \vdashinstr \MEMORYCOPY~x~y : [\X{at}_x~\X{at}_y~\atmin(\X{at}_x, \X{at}_y)] \to []
1901+
C \vdashinstr \MEMORYCOPY~x~y : [\X{at}_x~\X{at}_y~\addrtypemin(\X{at}_x, \X{at}_y)] \to []
19021902
}
19031903
19041904

0 commit comments

Comments
 (0)