summaryrefslogtreecommitdiff
path: root/src/ir/ReFinalize.cpp
diff options
context:
space:
mode:
authorSébastien Doeraene <sjrdoeraene@gmail.com>2024-08-21 00:43:25 +0200
committerGitHub <noreply@github.com>2024-08-20 15:43:25 -0700
commit340ad71810484c279b1a36a9a7e458c9b18855b9 (patch)
tree4167b08dea6f5ffcdb975d90eb6f3c7925f628e0 /src/ir/ReFinalize.cpp
parent2c9c74d8b64e1776c6c374af8631995b0be606f1 (diff)
downloadbinaryen-340ad71810484c279b1a36a9a7e458c9b18855b9.tar.gz
binaryen-340ad71810484c279b1a36a9a7e458c9b18855b9.tar.bz2
binaryen-340ad71810484c279b1a36a9a7e458c9b18855b9.zip
[Exceptions] Finish interpreter + optimizer support for try_table. (#6814)
* Add interpreter support for exnref values. * Fix optimization passes to support try_table. * Enable the interpreter (but not in V8, see code) on exceptions.
Diffstat (limited to 'src/ir/ReFinalize.cpp')
-rw-r--r--src/ir/ReFinalize.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ir/ReFinalize.cpp b/src/ir/ReFinalize.cpp
index 0f78d37b7..c32d6efbf 100644
--- a/src/ir/ReFinalize.cpp
+++ b/src/ir/ReFinalize.cpp
@@ -128,7 +128,12 @@ void ReFinalize::visitTableFill(TableFill* curr) { curr->finalize(); }
void ReFinalize::visitTableCopy(TableCopy* curr) { curr->finalize(); }
void ReFinalize::visitTableInit(TableInit* curr) { curr->finalize(); }
void ReFinalize::visitTry(Try* curr) { curr->finalize(); }
-void ReFinalize::visitTryTable(TryTable* curr) { curr->finalize(); }
+void ReFinalize::visitTryTable(TryTable* curr) {
+ curr->finalize();
+ for (size_t i = 0; i < curr->catchDests.size(); i++) {
+ updateBreakValueType(curr->catchDests[i], curr->sentTypes[i]);
+ }
+}
void ReFinalize::visitThrow(Throw* curr) { curr->finalize(); }
void ReFinalize::visitRethrow(Rethrow* curr) { curr->finalize(); }
void ReFinalize::visitThrowRef(ThrowRef* curr) { curr->finalize(); }