summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-debug.cpp
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2021-01-25 18:12:37 +0000
committerGitHub <noreply@github.com>2021-01-25 10:12:37 -0800
commitc74acc0baece1296ad58a0ff44119fb36d98d2c6 (patch)
treea056864640cf5f98211bc05bd3342446c2005c31 /src/wasm/wasm-debug.cpp
parent27a5a7101d20ce5fc51648e775587ab3d640114e (diff)
downloadbinaryen-c74acc0baece1296ad58a0ff44119fb36d98d2c6.tar.gz
binaryen-c74acc0baece1296ad58a0ff44119fb36d98d2c6.tar.bz2
binaryen-c74acc0baece1296ad58a0ff44119fb36d98d2c6.zip
Debug info handling for new EH try-catch (#3496)
We now have multiple catches in each try, and a possible catch-all. This changes our "extra delimiter" storage to store either an "else" (unchanged from before) or an arbitrary list of things - we use that for catches.
Diffstat (limited to 'src/wasm/wasm-debug.cpp')
-rw-r--r--src/wasm/wasm-debug.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/wasm/wasm-debug.cpp b/src/wasm/wasm-debug.cpp
index 52baaf24d..2c5ed9515 100644
--- a/src/wasm/wasm-debug.cpp
+++ b/src/wasm/wasm-debug.cpp
@@ -361,7 +361,7 @@ struct AddrExprMap {
// bloat the common case which is represented in the earlier maps.
struct DelimiterInfo {
Expression* expr;
- BinaryLocations::DelimiterId id;
+ size_t id;
};
std::unordered_map<BinaryLocation, DelimiterInfo> delimiterMap;
@@ -414,8 +414,7 @@ private:
for (Index i = 0; i < delimiter.size(); i++) {
if (delimiter[i] != 0) {
assert(delimiterMap.count(delimiter[i]) == 0);
- delimiterMap[delimiter[i]] =
- DelimiterInfo{expr, BinaryLocations::DelimiterId(i)};
+ delimiterMap[delimiter[i]] = DelimiterInfo{expr, i};
}
}
}