From 691c47508c2af9d8711a4bb189c3bc8f5d50cec4 Mon Sep 17 00:00:00 2001 From: Andreas Rossberg Date: Wed, 20 Sep 2023 15:29:55 +0200 Subject: [PATCH 1/5] List possible implementation limits --- document/core/appendix/implementation.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/document/core/appendix/implementation.rst b/document/core/appendix/implementation.rst index d5e53920f..3ef1b7dd6 100644 --- a/document/core/appendix/implementation.rst +++ b/document/core/appendix/implementation.rst @@ -41,6 +41,9 @@ An implementation may impose restrictions on the following dimensions of a modul * the number of :ref:`data segments ` in a :ref:`module ` * the number of :ref:`imports ` to a :ref:`module ` * the number of :ref:`exports ` from a :ref:`module ` +* the number of :ref:`sub types ` in a :ref:`recursive type ` +* the subtyping depth of a :ref:`sub type ` +* the number of fields in a :ref:`structure type ` * the number of parameters in a :ref:`function type ` * the number of results in a :ref:`function type ` * the number of parameters in a :ref:`block type ` @@ -50,7 +53,8 @@ An implementation may impose restrictions on the following dimensions of a modul * the size of a :ref:`structured control instruction ` * the number of :ref:`structured control instructions ` in a :ref:`function ` * the nesting depth of :ref:`structured control instructions ` -* the number of :ref:`label indices ` in a |brtable| instruction +* the number of :ref:`label indices ` in a |BRTABLE| instruction +* the length of the array in a |ARRAYNEWFIXED| instruction * the length of an :ref:`element segment ` * the length of a :ref:`data segment ` * the length of a :ref:`name ` @@ -124,8 +128,11 @@ Restrictions on the following dimensions may be imposed during :ref:`execution < * the number of allocated :ref:`table instances ` * the number of allocated :ref:`memory instances ` * the number of allocated :ref:`global instances ` +* the number of allocated :ref:`structure instances ` +* the number of allocated :ref:`array instances ` * the size of a :ref:`table instance ` * the size of a :ref:`memory instance ` +* the size of an :ref:`array instance ` * the number of :ref:`frames ` on the :ref:`stack ` * the number of :ref:`labels ` on the :ref:`stack ` * the number of :ref:`values ` on the :ref:`stack ` From b9517a6790490d1512ebf432784d2876365569ae Mon Sep 17 00:00:00 2001 From: Andreas Rossberg Date: Wed, 20 Sep 2023 23:23:25 +0200 Subject: [PATCH 2/5] Constant expressions --- document/core/appendix/implementation.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/document/core/appendix/implementation.rst b/document/core/appendix/implementation.rst index 3ef1b7dd6..d5dbc72e7 100644 --- a/document/core/appendix/implementation.rst +++ b/document/core/appendix/implementation.rst @@ -49,6 +49,7 @@ An implementation may impose restrictions on the following dimensions of a modul * the number of parameters in a :ref:`block type ` * the number of results in a :ref:`block type ` * the number of :ref:`locals ` in a :ref:`function ` +* the size of a :ref:`constant ` :ref:`expression ` * the size of a :ref:`function ` body * the size of a :ref:`structured control instruction ` * the number of :ref:`structured control instructions ` in a :ref:`function ` From d02e1fa1b4cc36d4eca168bc92cac1bb65d89c03 Mon Sep 17 00:00:00 2001 From: Andreas Rossberg Date: Wed, 20 Sep 2023 23:24:47 +0200 Subject: [PATCH 3/5] Constant expressions --- document/core/appendix/implementation.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/document/core/appendix/implementation.rst b/document/core/appendix/implementation.rst index d5dbc72e7..ad60d2c0e 100644 --- a/document/core/appendix/implementation.rst +++ b/document/core/appendix/implementation.rst @@ -81,6 +81,7 @@ For a module given in :ref:`binary format `, additional limitations may * the size of a :ref:`module ` * the size of any :ref:`section ` +* the size of an individual :ref:`constant ` :ref:`expression ` * the size of an individual function's :ref:`code ` * the number of :ref:`sections ` From 3d6aeea93f7bee2f655f78a87205df07c5442ebc Mon Sep 17 00:00:00 2001 From: Andreas Rossberg Date: Wed, 20 Sep 2023 23:28:25 +0200 Subject: [PATCH 4/5] Code --- document/core/appendix/implementation.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/document/core/appendix/implementation.rst b/document/core/appendix/implementation.rst index ad60d2c0e..ce445471a 100644 --- a/document/core/appendix/implementation.rst +++ b/document/core/appendix/implementation.rst @@ -81,8 +81,8 @@ For a module given in :ref:`binary format `, additional limitations may * the size of a :ref:`module ` * the size of any :ref:`section ` -* the size of an individual :ref:`constant ` :ref:`expression ` -* the size of an individual function's :ref:`code ` +* the size of an individual :ref:`constant ` :ref:`expression`'s instruction sequence +* the size of an individual :ref:`function`'s :ref:`code ` * the number of :ref:`sections ` From 9d1365444decf37ac186d98ef90edcce35db34b0 Mon Sep 17 00:00:00 2001 From: Andreas Rossberg Date: Wed, 20 Sep 2023 23:32:06 +0200 Subject: [PATCH 5/5] Some rephrasing --- document/core/appendix/implementation.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/document/core/appendix/implementation.rst b/document/core/appendix/implementation.rst index ce445471a..6de60fb58 100644 --- a/document/core/appendix/implementation.rst +++ b/document/core/appendix/implementation.rst @@ -49,12 +49,12 @@ An implementation may impose restrictions on the following dimensions of a modul * the number of parameters in a :ref:`block type ` * the number of results in a :ref:`block type ` * the number of :ref:`locals ` in a :ref:`function ` -* the size of a :ref:`constant ` :ref:`expression ` -* the size of a :ref:`function ` body -* the size of a :ref:`structured control instruction ` +* the number of :ref:`instructions ` in a :ref:`function ` body +* the number of :ref:`instructions ` in a :ref:`structured control instruction ` * the number of :ref:`structured control instructions ` in a :ref:`function ` * the nesting depth of :ref:`structured control instructions ` * the number of :ref:`label indices ` in a |BRTABLE| instruction +* the number of instructions in a :ref:`constant ` :ref:`expression ` * the length of the array in a |ARRAYNEWFIXED| instruction * the length of an :ref:`element segment ` * the length of a :ref:`data segment ` @@ -81,8 +81,9 @@ For a module given in :ref:`binary format `, additional limitations may * the size of a :ref:`module ` * the size of any :ref:`section ` -* the size of an individual :ref:`constant ` :ref:`expression`'s instruction sequence * the size of an individual :ref:`function`'s :ref:`code ` +* the size of a :ref:`structured control instruction ` +* the size of an individual :ref:`constant ` :ref:`expression`'s instruction sequence * the number of :ref:`sections `