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.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/wasm/wasm.cpp b/src/wasm/wasm.cpp
index c42a1089d..015df26ac 100644
--- a/src/wasm/wasm.cpp
+++ b/src/wasm/wasm.cpp
@@ -822,9 +822,9 @@ void RefNull::finalize() {}
void RefIs::finalize() {
if (value->type == Type::unreachable) {
type = Type::unreachable;
- return;
+ } else {
+ type = Type::i32;
}
- type = Type::i32;
}
void RefFunc::finalize() {
@@ -861,6 +861,14 @@ void TableSize::finalize() {
// Nothing to do - the type must have been set already during construction.
}
+void TableGrow::finalize() {
+ if (delta->type == Type::unreachable || value->type == Type::unreachable) {
+ type = Type::unreachable;
+ } else {
+ type = Type::i32;
+ }
+}
+
void Try::finalize() {
// If none of the component bodies' type is a supertype of the others, assume
// the current type is already correct. TODO: Calculate a proper LUB.