table.size $label
(table...)
object.
NONE |
i32 | The number of elements the table contains. |
;; Create default table of function references (table 4 funcref) ;; Create function (func $getTableElementCount (result i32) ;; Get the number of elements in the default table table.size ;; The stack contains an i32 value of 4 (elements in default table) )
;; Create labelled table of function references (table $testTable 6 funcref) ;; Create function (func $getTableElementCount (result i32) ;; Get the number of elements in the labelled table table.size $testTable ;; The stack contains an i32 value of 6 (elements in labelled table) )