summaryrefslogtreecommitdiff
path: root/src/wasm-type.h
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2023-12-08 15:03:09 -0800
committerGitHub <noreply@github.com>2023-12-08 15:03:09 -0800
commit1d615b38dd4152494d2f4d3520c8b1d917624a30 (patch)
tree40a32cc670c62e1fb5bdfcfda9f65d35d721956f /src/wasm-type.h
parent48373b66e613b7e626322b595ae6551582acc6c2 (diff)
downloadbinaryen-1d615b38dd4152494d2f4d3520c8b1d917624a30.tar.gz
binaryen-1d615b38dd4152494d2f4d3520c8b1d917624a30.tar.bz2
binaryen-1d615b38dd4152494d2f4d3520c8b1d917624a30.zip
[EH] Add exnref type back (#6149)
At the Oct hybrid CG meeting, we decided to add back `exnref`, which was removed in 2020: https://github.com/WebAssembly/meetings/blob/main/main/2023/CG-10.md The new version of the proposal reflected in the explainer: https://github.com/WebAssembly/exception-handling/blob/main/proposals/exception-handling/Exceptions.md While adding support for `exnref` in the current codebase which has all GC subtype hierarchies, I noticed we might need `noexn` heap type for the bottom type of `exn`. We don't have it now so I just set it to 0xff for the moment.
Diffstat (limited to 'src/wasm-type.h')
-rw-r--r--src/wasm-type.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/wasm-type.h b/src/wasm-type.h
index 573cd9102..5c47f4051 100644
--- a/src/wasm-type.h
+++ b/src/wasm-type.h
@@ -137,6 +137,9 @@ public:
// │ eqref ║ x │ │ x │ x │ n │ │ n_ullable
// │ i31ref ║ x │ │ x │ x │ n │ │
// │ structref ║ x │ │ x │ x │ n │ │
+ // │ arrayref ║ x │ │ x │ x │ n │ │
+ // │ exnref ║ x │ │ x │ x │ n │ │
+ // │ stringref ║ x │ │ x │ x │ n │ │
// ├─ Compound ──╫───┼───┼───┼───┤───────┤ │
// │ Ref ║ │ x │ x │ x │ f? n? │◄┘
// │ Tuple ║ │ x │ │ x │ │
@@ -167,6 +170,7 @@ public:
bool isSignature() const;
bool isStruct() const;
bool isArray() const;
+ bool isException() const;
bool isString() const;
bool isDefaultable() const;
@@ -322,6 +326,7 @@ public:
i31,
struct_,
array,
+ exn,
string,
stringview_wtf8,
stringview_wtf16,
@@ -329,8 +334,9 @@ public:
none,
noext,
nofunc,
+ noexn,
};
- static constexpr BasicHeapType _last_basic_type = nofunc;
+ static constexpr BasicHeapType _last_basic_type = noexn;
// BasicHeapType can be implicitly upgraded to HeapType
constexpr HeapType(BasicHeapType id) : id(id) {}
@@ -364,6 +370,7 @@ public:
bool isContinuation() const;
bool isStruct() const;
bool isArray() const;
+ bool isException() const;
bool isString() const;
bool isBottom() const;
bool isOpen() const;