diff options
author | Abbas Mashayekh <martianboy2005@gmail.com> | 2021-03-06 03:08:51 +0330 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-05 15:38:51 -0800 |
commit | 89b8af006bc56cb4bf68f12a80b1cfe8e7a353d4 (patch) | |
tree | 602bd8e24753b5e45c859a2c3672062ce07133fe /test/multi-table.wast.fromBinary | |
parent | 57619b508d38677844cb482a4034dc985d2cecc6 (diff) | |
download | binaryen-89b8af006bc56cb4bf68f12a80b1cfe8e7a353d4.tar.gz binaryen-89b8af006bc56cb4bf68f12a80b1cfe8e7a353d4.tar.bz2 binaryen-89b8af006bc56cb4bf68f12a80b1cfe8e7a353d4.zip |
[reference-types] Support passive elem segments (#3572)
Passive element segments do not belong to any table, so the link between
Table and elem needs to be weaker; i.e. an elem may have a table in case
of active segments, or simply be a collection of function references in
case of passive/declarative segments.
This PR takes Table::Segment out and turns it into a first class module
element just like tables and functions. It also implements early support
for parsing, printing, encoding and decoding passive/declarative elem
segments.
Diffstat (limited to 'test/multi-table.wast.fromBinary')
-rw-r--r-- | test/multi-table.wast.fromBinary | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/test/multi-table.wast.fromBinary b/test/multi-table.wast.fromBinary index 1bfd568da..13604e69d 100644 --- a/test/multi-table.wast.fromBinary +++ b/test/multi-table.wast.fromBinary @@ -4,12 +4,19 @@ (elem (table $t1) (i32.const 0) func $f) (table $t2 3 3 funcref) (elem (table $t2) (i32.const 0) func $f) - (elem (table $t2) (i32.const 1) func $f $g) + (elem $activeNonZeroOffset (table $t2) (i32.const 1) func $f $g) + (elem $passive func $f $g) + (elem declare func $h) (func $f - (nop) + (drop + (ref.func $h) + ) ) (func $g (nop) ) + (func $h + (nop) + ) ) |