From 7612271a72f00e2b385a98a7f79a031f94fb77e6 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Wed, 19 Apr 2023 10:10:47 -0700 Subject: [PATCH] Update constant expression validation rules (#17) These changes a published here: https://webassembly.github.io/extended-const/core/valid/instructions.html#constant-expressions --- document/core/valid/instructions.rst | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/document/core/valid/instructions.rst b/document/core/valid/instructions.rst index afcda69c01..0757219384 100644 --- a/document/core/valid/instructions.rst +++ b/document/core/valid/instructions.rst @@ -1604,6 +1604,8 @@ Constant Expressions * either of the form :math:`t.\CONST~c`, + * or of the form :math:`\K{i}\X{nn}\K{.}\ibinop`, where :math:`\ibinop` is limited to :math:`\ADD`, :math:`\SUB`, or :math:`\MUL`. + * or of the form :math:`\REFNULL`, * or of the form :math:`\REFFUNC~x`, @@ -1619,18 +1621,9 @@ Constant Expressions .. math:: \frac{ + \ibinop \in \{\ADD, \SUB, \MUL\} }{ - C \vdashinstrconst t.\CONST~c \const - } - \qquad - \frac{ - }{ - C \vdashinstrconst \REFNULL~t \const - } - \qquad - \frac{ - }{ - C \vdashinstrconst \REFFUNC~x \const + C \vdashinstrconst \K{i}\X{nn}\K{.}\ibinop \const } .. math::