Skip to content

Commit b723c8b

Browse files
committed
https://github.com/WebAssembly/binaryen/pull/3574
1 parent 1254b56 commit b723c8b

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/wasm-binary.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,7 @@ enum ASTNodes {
10261026

10271027
Try = 0x06,
10281028
Catch = 0x07,
1029-
CatchAll = 0x05,
1029+
CatchAll = 0x19,
10301030
Delegate = 0x18,
10311031
Throw = 0x08,
10321032
Rethrow = 0x09,
@@ -1617,4 +1617,4 @@ class WasmBinaryBuilder {
16171617

16181618
#undef DEBUG_TYPE
16191619

1620-
#endif // wasm_wasm_binary_h
1620+
#endif // wasm_wasm_binary_h

src/wasm/wasm-binary.cpp

+2-5
Original file line numberDiff line numberDiff line change
@@ -2967,16 +2967,13 @@ BinaryConsts::ASTNodes WasmBinaryBuilder::readExpression(Expression*& curr) {
29672967
}
29682968
break;
29692969
case BinaryConsts::Else:
2970-
case BinaryConsts::Catch: {
2970+
case BinaryConsts::Catch:
2971+
case BinaryConsts::CatchAll: {
29712972
curr = nullptr;
29722973
if (DWARF && currFunction) {
29732974
assert(!controlFlowStack.empty());
29742975
auto currControlFlow = controlFlowStack.back();
29752976
BinaryLocation delimiterId;
2976-
// Else and CatchAll have the same binary ID, so differentiate them
2977-
// using the control flow stack.
2978-
static_assert(BinaryConsts::CatchAll == BinaryConsts::Else,
2979-
"Else and CatchAll should have identical codes");
29802977
if (currControlFlow->is<If>()) {
29812978
delimiterId = BinaryLocations::Else;
29822979
} else {

0 commit comments

Comments
 (0)