don't use table for funcref

This commit is contained in:
2026-07-14 20:36:43 -06:00
parent 42f17c0dac
commit 42c2e79192
+4 -3
View File
@@ -3,9 +3,10 @@
(func $print (import "guppy" "print") (param i32)) (func $print (import "guppy" "print") (param i32))
;; declare a table with a reference to $halt in it. idk why, but this ;; declare a table with a reference to $halt in it. idk why, but this
is ;; necessary to use funcrefs lmfao. ;; is necessary to use funcrefs lmfao.
(table 2 funcref) ;; (table 2 funcref)
(elem (i32.const 0) $halt) ;; (elem (i32.const 0) $halt)
(elem declare funcref (ref.func $halt))
;; an array of return continuations. ;; an array of return continuations.
(type $cont (func (param i32))) (type $cont (func (param i32)))