diff options
author | Max Graey <maxgraey@gmail.com> | 2021-10-07 22:43:30 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-07 12:43:30 -0700 |
commit | 2dff27c086e8f2a9913096ebf3dc93e97051d85a (patch) | |
tree | 3d689a659ad2339639fc4b2e73753b51e6d9295c /src/wasm/wasm.cpp | |
parent | ff68bca64cd669aff59c7e1cc0a6677d267a410f (diff) | |
download | binaryen-2dff27c086e8f2a9913096ebf3dc93e97051d85a.tar.gz binaryen-2dff27c086e8f2a9913096ebf3dc93e97051d85a.tar.bz2 binaryen-2dff27c086e8f2a9913096ebf3dc93e97051d85a.zip |
Add table.set operation (#4215)
Diffstat (limited to 'src/wasm/wasm.cpp')
-rw-r--r-- | src/wasm/wasm.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/wasm/wasm.cpp b/src/wasm/wasm.cpp index 19ba5f265..26e6b369b 100644 --- a/src/wasm/wasm.cpp +++ b/src/wasm/wasm.cpp @@ -825,6 +825,14 @@ void TableGet::finalize() { // Otherwise, the type should have been set already. } +void TableSet::finalize() { + if (index->type == Type::unreachable || value->type == Type::unreachable) { + type = Type::unreachable; + } else { + type = Type::none; + } +} + void Try::finalize() { // If none of the component bodies' type is a supertype of the others, assume // the current type is already correct. TODO: Calculate a proper LUB. |