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.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ir/eh-utils.h b/src/ir/eh-utils.h
index 844fda448..733eedc67 100644
--- a/src/ir/eh-utils.h
+++ b/src/ir/eh-utils.h
@@ -17,9 +17,9 @@
#ifndef wasm_ir_eh_h
#define wasm_ir_eh_h
-namespace wasm {
+#include "wasm.h"
-class Expression;
+namespace wasm {
namespace EHUtils {
@@ -31,6 +31,12 @@ namespace EHUtils {
// catch body, which is invalid. That will be taken care of in validation.
bool isPopValid(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.
+void handleBlockNestedPops(Function* func, Module& wasm);
+
} // namespace EHUtils
} // namespace wasm