summaryrefslogtreecommitdiff
path: root/src/wasm-binary.h
diff options
context:
space:
mode:
authorThomas Lively <7121787+tlively@users.noreply.github.com>2022-08-17 22:51:27 -0700
committerGitHub <noreply@github.com>2022-08-17 22:51:27 -0700
commit2d86d1f8fb217456d8bcc4b401ce7d143aa36ee9 (patch)
treeec852da20ed85c7e5f9be7a5e3fb0632d7caf949 /src/wasm-binary.h
parent3aff4c6e85623c970280219c6699a66bc9de5f9b (diff)
downloadbinaryen-2d86d1f8fb217456d8bcc4b401ce7d143aa36ee9.tar.gz
binaryen-2d86d1f8fb217456d8bcc4b401ce7d143aa36ee9.tar.bz2
binaryen-2d86d1f8fb217456d8bcc4b401ce7d143aa36ee9.zip
Restore the `extern` heap type (#4898)
The GC proposal has split `any` and `extern` back into two separate types, so reintroduce `HeapType::ext` to represent `extern`. Before it was originally removed in #4633, externref was a subtype of anyref, but now it is not. Now that we have separate heaptype type hierarchies, make `HeapType::getLeastUpperBound` fallible as well.
Diffstat (limited to 'src/wasm-binary.h')
-rw-r--r--src/wasm-binary.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/wasm-binary.h b/src/wasm-binary.h
index 9424f6fda..aef1767bb 100644
--- a/src/wasm-binary.h
+++ b/src/wasm-binary.h
@@ -363,8 +363,10 @@ enum EncodedType {
i16 = -0x7, // 0x79
// function reference type
funcref = -0x10, // 0x70
- // top type of references, including host references
- anyref = -0x11, // 0x6f
+ // external (host) references
+ externref = -0x11, // 0x6f
+ // top type of references to non-function Wasm data.
+ anyref = -0x12, // 0x6e
// comparable reference type
eqref = -0x13, // 0x6d
// nullable typed function reference type, with parameter
@@ -396,7 +398,8 @@ enum EncodedType {
enum EncodedHeapType {
func = -0x10, // 0x70
- any = -0x11, // 0x6f
+ ext = -0x11, // 0x6f
+ any = -0x12, // 0x6e
eq = -0x13, // 0x6d
i31 = -0x16, // 0x6a
data = -0x19, // 0x67