summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wasm-binary.h4
-rw-r--r--src/wasm/wasm-binary.cpp7
2 files changed, 4 insertions, 7 deletions
diff --git a/src/wasm-binary.h b/src/wasm-binary.h
index 811524d2d..99305acb2 100644
--- a/src/wasm-binary.h
+++ b/src/wasm-binary.h
@@ -1026,7 +1026,7 @@ enum ASTNodes {
Try = 0x06,
Catch = 0x07,
- CatchAll = 0x05,
+ CatchAll = 0x19,
Delegate = 0x18,
Throw = 0x08,
Rethrow = 0x09,
@@ -1617,4 +1617,4 @@ private:
#undef DEBUG_TYPE
-#endif // wasm_wasm_binary_h \ No newline at end of file
+#endif // wasm_wasm_binary_h
diff --git a/src/wasm/wasm-binary.cpp b/src/wasm/wasm-binary.cpp
index b843aad03..dc0b1ab21 100644
--- a/src/wasm/wasm-binary.cpp
+++ b/src/wasm/wasm-binary.cpp
@@ -2967,16 +2967,13 @@ BinaryConsts::ASTNodes WasmBinaryBuilder::readExpression(Expression*& curr) {
}
break;
case BinaryConsts::Else:
- case BinaryConsts::Catch: {
+ case BinaryConsts::Catch:
+ case BinaryConsts::CatchAll: {
curr = nullptr;
if (DWARF && currFunction) {
assert(!controlFlowStack.empty());
auto currControlFlow = controlFlowStack.back();
BinaryLocation delimiterId;
- // Else and CatchAll have the same binary ID, so differentiate them
- // using the control flow stack.
- static_assert(BinaryConsts::CatchAll == BinaryConsts::Else,
- "Else and CatchAll should have identical codes");
if (currControlFlow->is<If>()) {
delimiterId = BinaryLocations::Else;
} else {