summaryrefslogtreecommitdiff
path: root/src/ir/eh-utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ir/eh-utils.h')
-rw-r--r--src/ir/eh-utils.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/ir/eh-utils.h b/src/ir/eh-utils.h
index c0d6e59ea..25677a32e 100644
--- a/src/ir/eh-utils.h
+++ b/src/ir/eh-utils.h
@@ -31,10 +31,13 @@ namespace EHUtils {
// catch body, which is invalid. That will be taken care of in validation.
bool containsValidDanglingPop(Expression* catchBody);
-// Fixes up 'pop's nested in blocks, which are currently not supported without
-// block param types, by creating a new local, putting a (local.set $new (pop
-// type)) right after 'catch', and putting a '(local.get $new)' where the 'pop'
-// used to be.
+// Given a 'Try' expression, fixes up 'pop's nested in blocks, which are
+// currently not supported without block param types, by creating a new local,
+// putting a (local.set $new (pop type)) right after 'catch', and putting a
+// '(local.get $new)' where the 'pop' used to be.
+void handleBlockNestedPop(Try* try_, Function* func, Module& wasm);
+
+// Calls handleBlockNestedPop for each 'Try's in a given function.
void handleBlockNestedPops(Function* func, Module& wasm);
} // namespace EHUtils