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.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/wasm/wasm.cpp b/src/wasm/wasm.cpp
index 8d4f1dcee..428e5093c 100644
--- a/src/wasm/wasm.cpp
+++ b/src/wasm/wasm.cpp
@@ -1173,6 +1173,14 @@ void RefAs::finalize() {
}
}
+void StringNew::finalize() {
+ if (ptr->type == Type::unreachable || length->type == Type::unreachable) {
+ type = Type::unreachable;
+ } else {
+ type = Type(HeapType::string, NonNullable);
+ }
+}
+
size_t Function::getNumParams() { return getParams().size(); }
size_t Function::getNumVars() { return vars.size(); }