table.get
Gets a function reference from a table and pushes it onto the stack.
Parameters
$label Optional
If there is no label then the default table is used. If used then this points to a (table...)
object.
Stack In
i32 |
The index of the function reference in the table. |
Stack Out
funcref |
The reference to a function. |
Examples
(table 4 funcref)
(func $test
(local $function funcref)
i32.const 0
table.get
local.set $function
i32.const 1
local.get $function
table.set
)
(table $testTable 6 funcref)
(func $test
(local $function funcref)
i32.const 0
table.get $testTable
local.set $function
i32.const 1
local.get $function
table.set $testTable
)