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.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/wasm/wasm.cpp b/src/wasm/wasm.cpp
index 0dfcf5c2e..761c17116 100644
--- a/src/wasm/wasm.cpp
+++ b/src/wasm/wasm.cpp
@@ -1035,6 +1035,20 @@ void ArrayNew::finalize() {
type = Type(rtt->type.getHeapType(), NonNullable);
}
+void ArrayInit::finalize() {
+ if (rtt->type == Type::unreachable) {
+ type = Type::unreachable;
+ return;
+ }
+ for (auto* value : values) {
+ if (value->type == Type::unreachable) {
+ type = Type::unreachable;
+ return;
+ }
+ }
+ type = Type(rtt->type.getHeapType(), NonNullable);
+}
+
void ArrayGet::finalize() {
if (ref->type == Type::unreachable || index->type == Type::unreachable) {
type = Type::unreachable;