diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/interp/interp.cc | 7 | ||||
-rw-r--r-- | src/interp/interp.h | 5 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/interp/interp.cc b/src/interp/interp.cc index bf07f5c9..161724b1 100644 --- a/src/interp/interp.cc +++ b/src/interp/interp.cc @@ -41,9 +41,12 @@ const char* GetName(ExternKind kind) { const char* GetName(ObjectKind kind) { static const char* kNames[] = { - "Null", "Foreign", "Trap", "DefinedFunc", "HostFunc", "Table", - "Memory", "Global", "Tag", "Module", "Instance", "Thread", + "Null", "Foreign", "Trap", "Exception", "DefinedFunc", "HostFunc", + "Table", "Memory", "Global", "Tag", "Module", "Instance", }; + + WABT_STATIC_ASSERT(WABT_ARRAY_SIZE(kNames) == kCommandTypeCount); + return kNames[int(kind)]; } diff --git a/src/interp/interp.h b/src/interp/interp.h index 97faec2d..eaa3f2c4 100644 --- a/src/interp/interp.h +++ b/src/interp/interp.h @@ -91,8 +91,13 @@ enum class ObjectKind { Tag, Module, Instance, + + First = Null, + Last = Instance, }; +static const int kCommandTypeCount = WABT_ENUM_COUNT(ObjectKind); + const char* GetName(Mutability); const std::string GetName(ValueType); const char* GetName(ExternKind); |