diff options
author | Alon Zakai <azakai@google.com> | 2021-09-30 17:54:05 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-30 17:54:05 -0700 |
commit | 65bcde2c30e82047a892332b95b114bc86f89614 (patch) | |
tree | fad936a8ed9b3275da50917bcebcbc235ab82600 /src/wasm/wasm-stack.cpp | |
parent | ce8cdac461db4e0a3e178a59f8eb1447bfee51e1 (diff) | |
download | binaryen-65bcde2c30e82047a892332b95b114bc86f89614.tar.gz binaryen-65bcde2c30e82047a892332b95b114bc86f89614.tar.bz2 binaryen-65bcde2c30e82047a892332b95b114bc86f89614.zip |
Implement table.get (#4195)
Adds the part of the spec test suite that this passes (without table.set we
can't do it all).
Diffstat (limited to 'src/wasm/wasm-stack.cpp')
-rw-r--r-- | src/wasm/wasm-stack.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wasm/wasm-stack.cpp b/src/wasm/wasm-stack.cpp index 70b52cfbb..58bd29f6e 100644 --- a/src/wasm/wasm-stack.cpp +++ b/src/wasm/wasm-stack.cpp @@ -1847,6 +1847,11 @@ void BinaryInstWriter::visitRefEq(RefEq* curr) { o << int8_t(BinaryConsts::RefEq); } +void BinaryInstWriter::visitTableGet(TableGet* curr) { + o << int8_t(BinaryConsts::TableGet); + o << U32LEB(parent.getTableIndex(curr->table)); +} + void BinaryInstWriter::visitTry(Try* curr) { breakStack.push_back(curr->name); o << int8_t(BinaryConsts::Try); |