summaryrefslogtreecommitdiff
path: root/src/wasm/wasm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm/wasm.cpp')
-rw-r--r--src/wasm/wasm.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/wasm/wasm.cpp b/src/wasm/wasm.cpp
index d0a916072..04abbcd9f 100644
--- a/src/wasm/wasm.cpp
+++ b/src/wasm/wasm.cpp
@@ -405,10 +405,18 @@ template<typename T> void handleUnreachableOperands(T* curr) {
}
}
-void Call::finalize() { handleUnreachableOperands(this); }
+void Call::finalize() {
+ handleUnreachableOperands(this);
+ if (isReturn) {
+ type = unreachable;
+ }
+}
void CallIndirect::finalize() {
handleUnreachableOperands(this);
+ if (isReturn) {
+ type = unreachable;
+ }
if (target->type == unreachable) {
type = unreachable;
}