diff options
Diffstat (limited to 'test/lit/merge/table_elem.wat.second')
-rw-r--r-- | test/lit/merge/table_elem.wat.second | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/test/lit/merge/table_elem.wat.second b/test/lit/merge/table_elem.wat.second new file mode 100644 index 000000000..7aa960c7f --- /dev/null +++ b/test/lit/merge/table_elem.wat.second @@ -0,0 +1,37 @@ +(module + (type $vec (array funcref)) + + (table $foo 100 funcref) + + (table $other 1000 funcref) + + (elem $a (table $foo) (i32.const 0) func) + + (elem $b (table $other) (i32.const 0) func) + + (func "keepalive2" + (drop + (table.get $foo + (i32.const 1) + ) + ) + (drop + (table.get $other + (i32.const 1) + ) + ) + ;; GC operations are the only things that can keep alive an elem segment. + (drop + (array.new_elem $vec $a + (i32.const 5) + (i32.const 6) + ) + ) + (drop + (array.new_elem $vec $b + (i32.const 7) + (i32.const 8) + ) + ) + ) +) |