Skip to content
1 change: 1 addition & 0 deletions document/core/syntax/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ $${syntax: {absheaptype/syn heaptype}}

A heap type is either *abstract* or *concrete*.
A concrete heap type consists of a :ref:`type use <syntax-typeuse>` that classifies an object of the respective :ref:`type <syntax-type>` defined in a module.
A concrete heap type may be *exact*, in which case it classifies objects of precisely the respective :ref:`type <syntax-type>` and not any other type that may :ref:`match <match-heaptype>` it.
Abstract types are denoted by individual keywords.

The type ${:FUNC} denotes the common supertype of all :ref:`function types <syntax-functype>`, regardless of their concrete definition.
Expand Down
1 change: 1 addition & 0 deletions document/core/util/macros.def
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@
.. |REF| mathdef:: \xref{syntax/types}{syntax-reftype}{\K{ref}}
.. |NULL| mathdef:: \xref{syntax/types}{syntax-reftype}{\K{null}}

.. |EXACT| mathdef:: \xref{syntax/types}{syntax-heaptype}{\K{exact}}
.. |ANY| mathdef:: \xref{syntax/types}{syntax-heaptype}{\K{any}}
.. |EQT| mathdef:: \xref{syntax/types}{syntax-heaptype}{\K{eq}}
.. |I31| mathdef:: \xref{syntax/types}{syntax-heaptype}{\K{i\scriptstyle31}}
Expand Down
2 changes: 1 addition & 1 deletion specification/wasm-latest/1.2-syntax.types.spectec
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ syntax typevar hint(desc "type variable") =
| _IDX typeidx | REC n hint(show REC.%)

syntax heaptype hint(desc "heap type") =
| absheaptype | typeuse
| absheaptype | typeuse | EXACT typeuse

syntax reftype hint(desc "reference type") =
| REF null? heaptype
Expand Down
Loading