diff options
author | Abbas Mashayekh <martianboy2005@gmail.com> | 2021-03-24 21:43:45 +0430 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-24 10:13:45 -0700 |
commit | ffac06650507ac413d60d72aadc1e33fb1f91ccf (patch) | |
tree | f581d02da66df8db2a775fc731d39baf15d96c82 /src/wasm.h | |
parent | 683c31381f5798016f683a6b42e2a8fad0f871cb (diff) | |
download | binaryen-ffac06650507ac413d60d72aadc1e33fb1f91ccf.tar.gz binaryen-ffac06650507ac413d60d72aadc1e33fb1f91ccf.tar.bz2 binaryen-ffac06650507ac413d60d72aadc1e33fb1f91ccf.zip |
[RT] Support expressions in element segments (#3666)
This PR adds support for `ref.null t` as a valid element segment
item. The abbreviated format of `(elem ... func $f $g...)` is kept in
both printing and binary emitting if all items are `ref.func`s. Public
APIs aren't updated in this PR.
Diffstat (limited to 'src/wasm.h')
-rw-r--r-- | src/wasm.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wasm.h b/src/wasm.h index 630e5b003..4747b48a3 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -1722,12 +1722,12 @@ class ElementSegment : public Named { public: Name table; Expression* offset; - std::vector<Name> data; + std::vector<Expression*> data; ElementSegment() = default; ElementSegment(Name table, Expression* offset) : table(table), offset(offset) {} - ElementSegment(Name table, Expression* offset, std::vector<Name>& init) + ElementSegment(Name table, Expression* offset, std::vector<Expression*>& init) : table(table), offset(offset) { data.swap(init); } |