From ffac06650507ac413d60d72aadc1e33fb1f91ccf Mon Sep 17 00:00:00 2001 From: Abbas Mashayekh Date: Wed, 24 Mar 2021 21:43:45 +0430 Subject: [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. --- src/wasm-traversal.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/wasm-traversal.h') 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(this)->visitElementSegment(segment); } -- cgit v1.2.3