diff options
author | Alon Zakai <azakai@google.com> | 2021-03-24 10:54:49 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-24 10:54:49 -0700 |
commit | 0b0e20f9802afa2f74a896853b4c1be4d3f49f1e (patch) | |
tree | beb1a0f831f328967b973ee6e383c9ba743418a2 /src | |
parent | 7d00f654bb3545beb5772f2f19768a48779e3db6 (diff) | |
download | binaryen-0b0e20f9802afa2f74a896853b4c1be4d3f49f1e.tar.gz binaryen-0b0e20f9802afa2f74a896853b4c1be4d3f49f1e.tar.bz2 binaryen-0b0e20f9802afa2f74a896853b4c1be4d3f49f1e.zip |
[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.
Diffstat (limited to 'src')
-rw-r--r-- | src/passes/Flatten.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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 <ir/effects.h> #include <ir/flat.h> #include <ir/properties.h> +#include <ir/type-updating.h> #include <ir/utils.h> #include <pass.h> #include <wasm-builder.h> @@ -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: |