summaryrefslogtreecommitdiff
path: root/src/wasm-type.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm-type.h')
-rw-r--r--src/wasm-type.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/wasm-type.h b/src/wasm-type.h
index 05deeef15..4d908fe05 100644
--- a/src/wasm-type.h
+++ b/src/wasm-type.h
@@ -186,6 +186,13 @@ public:
bool isArray() const;
bool isDefaultable() const;
+ // Check if a type is either defaultable or non-nullable. This is useful in
+ // the case where we allow non-nullable types, but we disallow other things
+ // that are non-defaultable. For example, when GC-non-nullable references are
+ // allowed we can have a non-nullable reference, but we cannot have any other
+ // nondefaultable type.
+ bool isDefaultableOrNonNullable() const;
+
Nullability getNullability() const;
private: