blob: 5b226b60fc9c275d7bdf838c4366e8a2108de3b2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
(module
(type $array (array (mut funcref)))
(table $table-used 10 funcref)
(table $table-unused 10 funcref)
;; An active element segment, which is always used.
(elem $elem (table $table-used) (i32.const 0) func $func)
(elem $passive-elem-used $func)
(elem $passive-elem-unused $func)
(func $func (export "test")
;; Use the used table and passive element segment.
(table.fill $table-used
(i32.const 0)
(ref.func $func)
(i32.const 0)
)
(drop
(array.new_elem $array $passive-elem-used
(i32.const 0)
(i32.const 1)
)
)
)
)
|