summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2021-01-29 12:01:02 +0900
committerGitHub <noreply@github.com>2021-01-29 12:01:02 +0900
commit89b811699b2db0c0e2ad744a1240f6283f8eed86 (patch)
tree6d0e2b19bd230f32bdbb564cd8539e26f0dabee7 /src
parentbbf40d06a162be8f88a60d1fc4edc3f0015c6c91 (diff)
downloadbinaryen-89b811699b2db0c0e2ad744a1240f6283f8eed86.tar.gz
binaryen-89b811699b2db0c0e2ad744a1240f6283f8eed86.tar.bz2
binaryen-89b811699b2db0c0e2ad744a1240f6283f8eed86.zip
Don't error out when EH is used for Flatten (#3526)
We used to error out in Flatten when EH is used because Flatten makes all block types `none` by setting their return values to locals and getting them later, but `br_on_exn` by definition pops value from the value stack at the end of a block so it couldn't be flattened. Now that we don't have `br_on_exn` we don't need these restriction.
Diffstat (limited to 'src')
-rw-r--r--src/passes/Flatten.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/passes/Flatten.cpp b/src/passes/Flatten.cpp
index 3ff037268..20d7cef23 100644
--- a/src/passes/Flatten.cpp
+++ b/src/passes/Flatten.cpp
@@ -74,10 +74,6 @@ struct Flatten
return;
}
- if (curr->is<Try>() || curr->is<Throw>() || curr->is<Rethrow>()) {
- Fatal() << "Flatten does not support EH instructions yet";
- }
-
if (Properties::isControlFlowStructure(curr)) {
// handle control flow explicitly. our children do not have control flow,
// but they do have preludes which we need to set up in the right place