diff --git a/document/core/syntax/types.rst b/document/core/syntax/types.rst index 4b75d6a48..eac06d01a 100644 --- a/document/core/syntax/types.rst +++ b/document/core/syntax/types.rst @@ -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 ` that classifies an object of the respective :ref:`type ` defined in a module. +A concrete heap type may be *exact*, in which case it classifies objects of precisely the respective :ref:`type ` and not any other type that may :ref:`match ` it. Abstract types are denoted by individual keywords. The type ${:FUNC} denotes the common supertype of all :ref:`function types `, regardless of their concrete definition. diff --git a/document/core/util/macros.def b/document/core/util/macros.def index ef3b39299..1dfebf2da 100644 --- a/document/core/util/macros.def +++ b/document/core/util/macros.def @@ -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}} diff --git a/specification/wasm-latest/1.2-syntax.types.spectec b/specification/wasm-latest/1.2-syntax.types.spectec index e0ee0b510..f635bd49b 100644 --- a/specification/wasm-latest/1.2-syntax.types.spectec +++ b/specification/wasm-latest/1.2-syntax.types.spectec @@ -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