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.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/wasm/wasm.cpp b/src/wasm/wasm.cpp
index 22ea4d86f..a4b9da21b 100644
--- a/src/wasm/wasm.cpp
+++ b/src/wasm/wasm.cpp
@@ -1244,13 +1244,12 @@ void RefAs::finalize() {
}
void StringNew::finalize() {
- if (ptr->type == Type::unreachable ||
- (length && length->type == Type::unreachable) ||
+ if (ref->type == Type::unreachable ||
(start && start->type == Type::unreachable) ||
(end && end->type == Type::unreachable)) {
type = Type::unreachable;
} else {
- type = Type(HeapType::string, try_ ? Nullable : NonNullable);
+ type = Type(HeapType::string, NonNullable);
}
}
@@ -1265,8 +1264,8 @@ void StringMeasure::finalize() {
}
void StringEncode::finalize() {
- if (ref->type == Type::unreachable || ptr->type == Type::unreachable ||
- (start && start->type == Type::unreachable)) {
+ if (str->type == Type::unreachable || array->type == Type::unreachable ||
+ start->type == Type::unreachable) {
type = Type::unreachable;
} else {
type = Type::i32;