(module (type (;0;) (func (param i32) (result i32))) (type (;1;) (func (param i32 i32) (result funcref))) (table $t (;0;) 10 funcref) (export "grow" (func 0)) (export "check-table-null" (func 1)) (elem (;0;) declare func 1) (func (;0;) (type 0) (param i32) (result i32) ref.null func local.get 0 table.grow $t ) (func (;1;) (type 1) (param i32 i32) (result funcref) (local funcref) ref.func 1 local.set 2 block ;; label = @1 loop ;; label = @2 local.get 0 table.get $t local.set 2 local.get 2 ref.is_null i32.eqz br_if 1 (;@1;) local.get 0 local.get 1 i32.ge_u br_if 1 (;@1;) local.get 0 i32.const 1 i32.add local.set 0 local.get 0 local.get 1 i32.le_u br_if 0 (;@2;) end end local.get 2 ) )