Skip to content

Commit 92d7e86

Browse files
committed
[spec] Tweaks
1 parent 3d487bf commit 92d7e86

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

document/core/appendix/properties.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Contexts
2727
~~~~~~~~
2828

2929
In order to check :ref:`rolled up <aux-roll-rectype>` recursive types,
30-
the :ref:`context <context>` is locally extended with an additional component that records the :ref:`sub type <syntax-subtype>` corresponding to each :ref:`recursive type index <syntax-rectypeidx>` within the current :ref:`recursive type <syntax-rectype>`:
30+
the :ref:`context <context>` is locally extended with an additional component that records the :ref:`sub type <syntax-subtype>` corresponding to each :ref:`recursive type index <syntax-rectypeidx>` within the current group of :ref:`recursive types <syntax-rectype>`:
3131

3232
$${syntax: context/sem}
3333

document/core/valid/conventions.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ Validity of an individual definition is specified relative to a *context*,
218218
which collects relevant information about the surrounding :ref:`module <syntax-module>` and the definitions in scope:
219219

220220
* *Types*: the list of :ref:`types <syntax-type>` defined in the current module.
221-
.. * *Recursive Types*: the list of :ref:`sub types <syntax-subtype>` in the current group of recursive types.
222221
* *Functions*: the list of :ref:`functions <syntax-func>` declared in the current module, represented by a :ref:`defined type <syntax-deftype>` that :ref:`expands <aux-expand-deftype>` to their :ref:`function type <syntax-functype>`.
223222
* *Tables*: the list of :ref:`tables <syntax-table>` declared in the current module, represented by their :ref:`table type <syntax-tabletype>`.
224223
* *Memories*: the list of :ref:`memories <syntax-mem>` declared in the current module, represented by their :ref:`memory type <syntax-memtype>`.
@@ -241,7 +240,7 @@ More concretely, contexts are defined as :ref:`records <notation-record>` ${:C}
241240
$${syntax: context/syn}
242241

243242
.. note::
244-
The definition of contexts is :ref:`extended <context-ext>` with additional fields for the purpose of proving :ref:`type soundness <soundness>`.
243+
The definition of contexts needs to be :ref:`extended <context-ext>` with additional fields for the purpose of proving :ref:`type soundness <soundness>`.
245244

246245

247246
.. index:: ! type closure

specification/wasm-3.0/2.0-validation.contexts.spectec

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@ var it : instrtype
2121

2222
;; Contexts
2323

24-
syntax context hint(desc "context") hint(macro "%" "C%") =
24+
syntax context/syn hint(desc "context") hint(macro "%" "C%") =
2525
{ TYPES deftype* hint(desc "type"),
26-
RECS subtype* hint(desc "recursive type"),
2726
TAGS tagtype* hint(desc "tag"),
2827
GLOBALS globaltype* hint(desc "global"),
2928
MEMS memtype* hint(desc "memory"),
@@ -34,9 +33,13 @@ syntax context hint(desc "context") hint(macro "%" "C%") =
3433
LOCALS localtype* hint(desc "local"),
3534
LABELS resulttype* hint(desc "label"),
3635
RETURN resulttype? hint(desc "result"),
37-
REFS funcidx*
36+
REFS funcidx* hint(desc "references"),
37+
...
3838
}
3939

40+
syntax context/sem hint(macro "%" "C%") =
41+
{ ..., RECS subtype* hint(desc "recursive type") }
42+
4043
var C : context
4144

4245

specification/wasm-latest/2.0-validation.contexts.spectec

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ syntax context/syn hint(desc "context") hint(macro "%" "C%") =
3838
}
3939

4040
syntax context/sem hint(macro "%" "C%") =
41-
{ ...,
42-
RECS subtype* hint(desc "recursive type")
43-
}
41+
{ ..., RECS subtype* hint(desc "recursive type") }
4442

4543
var C : context
4644

0 commit comments

Comments
 (0)