Our Wasm implementations current reject data.drop and elem.drop if there is no
memory or table in the module. This isn't consistent with the current
bulk-memory specification, though.
This patch fixes that by slightly loosening the relevant checks, so as to
allow a segment to be dropped even if there is no memory, providing that that
segment is a passive one.
Most of the changes are in the test file passive-segs-nonboundary.js:
There are four new checks for data.drop without memory and the equivalents
Test construction function
do_test has been made more flexible, so it is
now possible to independently specify whether a table/memory is present,
whether active initialisers are present, and whether passive initialisers
In WasmModule.cpp, a couple of places where a segment vector was asserted to
be empty have been changed to assert that it contains only passive segments.
Attempts to do this using std::all_of and a closure were unsuccessful (see bug
1547031) and instead a debug-only helper function