table.grow
Increase the number of elements a table contains.
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
funcref |
A reference to a function. |
i32 |
The number of elements to increase the table by. |
Stack Out
i32 |
The previous size of the table. If the value -1 is returned then the table failed to grow. |
Examples
(table 4 funcref)
(func $growDefaultTable (result i32)
ref.null func
i32.const 2
table.grow
)
(table $testTable 6 funcref)
(func $growTestTable (result i32)
ref.null func
i32.const 2
table.grow $testTable
)