summaryrefslogtreecommitdiff
path: root/src/wasm-traversal.h
diff options
context:
space:
mode:
authorAbbas Mashayekh <martianboy2005@gmail.com>2021-03-24 21:43:45 +0430
committerGitHub <noreply@github.com>2021-03-24 10:13:45 -0700
commitffac06650507ac413d60d72aadc1e33fb1f91ccf (patch)
treef581d02da66df8db2a775fc731d39baf15d96c82 /src/wasm-traversal.h
parent683c31381f5798016f683a6b42e2a8fad0f871cb (diff)
downloadbinaryen-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-traversal.h')
-rw-r--r--src/wasm-traversal.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wasm-traversal.h b/src/wasm-traversal.h
index 7dcf2d146..1f307c318 100644
--- a/src/wasm-traversal.h
+++ b/src/wasm-traversal.h
@@ -196,6 +196,9 @@ struct Walker : public VisitorType {
if (segment->table.is()) {
walk(segment->offset);
}
+ for (auto* expr : segment->data) {
+ walk(expr);
+ }
static_cast<SubType*>(this)->visitElementSegment(segment);
}