bulk_table_fill.wat (393B)
1 (module 2 (type $ret_i32 (func (result i32))) 3 (func $target (type $ret_i32) 4 i32.const 42) 5 (table 4 16 funcref) 6 (func (export "test_main") (result i32) 7 ;; table.fill: dst=1 ref=funcref(target) len=2 8 i32.const 1 9 ref.func $target 10 i32.const 2 11 table.fill 12 ;; Indirect call through table[2] (filled with $target). 13 i32.const 2 14 call_indirect (type $ret_i32)))