summaryrefslogtreecommitdiff
path: root/src/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/common.h b/src/common.h
index 14db973f..bcd4c8d2 100644
--- a/src/common.h
+++ b/src/common.h
@@ -376,6 +376,16 @@ static WABT_INLINE const char* GetSymbolTypeName(SymbolType type) {
/* type */
+static WABT_INLINE bool IsRefType(Type t) {
+ return t == Type::Anyref || t == Type::Funcref || t == Type::Nullref ||
+ t == Type::Hostref;
+}
+
+static WABT_INLINE bool IsNullableRefType(Type t) {
+ /* Currently all reftypes are nullable */
+ return IsRefType(t);
+}
+
static WABT_INLINE const char* GetTypeName(Type type) {
switch (type) {
case Type::I32: