From 0b0e20f9802afa2f74a896853b4c1be4d3f49f1e Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 24 Mar 2021 10:54:49 -0700 Subject: [Wasm GC] Handle non-nullable locals in Flatten pass (#3720) That pass adds lots of new locals, and we need to handle non-nullable ones. --- src/passes/Flatten.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/passes/Flatten.cpp b/src/passes/Flatten.cpp index 20d7cef23..39c97b133 100644 --- a/src/passes/Flatten.cpp +++ b/src/passes/Flatten.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -316,6 +317,8 @@ struct Flatten } // the body may have preludes curr->body = getPreludesWithExpression(originalBody, curr->body); + // New locals we added may be non-nullable. + TypeUpdating::handleNonNullableLocals(curr, *getModule()); } private: -- cgit v1.2.3