Table

Table

data class Table

Represents a table in a WasmModule.

From the docs:

The tables component of a module defines a vector of tables described by their table type:


table ::=

A table is a vector of opaque values of a particular table element type. The min size in the limits of the table type specifies the initial size of that table, while its max, if present, restricts the size to which it can grow later.

Tables can be initialized through element segments.

Tables are referenced through table indices, starting with the smallest index not referencing a table import. Most constructs implicitly reference table index 0.

Note:** In the current version of WebAssembly, at most one table may be defined or imported in a single module, and all constructs implicitly reference this table 0. This restriction may be lifted in future versions.

Fields

Name Description
val id: Table
val tableType: TableType

Constructors

<init>

constructor(id: Table, tableType: TableType)

Represents a table in a WasmModule.

From the docs:

The tables component of a module defines a vector of tables described by their table type:


table ::=

A table is a vector of opaque values of a particular table element type. The min size in the limits of the table type specifies the initial size of that table, while its max, if present, restricts the size to which it can grow later.

Tables can be initialized through element segments.

Tables are referenced through table indices, starting with the smallest index not referencing a table import. Most constructs implicitly reference table index 0.

Note:** In the current version of WebAssembly, at most one table may be defined or imported in a single module, and all constructs implicitly reference this table 0. This restriction may be lifted in future versions.

Parameters

Name Description
id: Table
tableType: TableType

Extensions

validate

fun Table.validate(context: Module): Module

Validates the Table node.

Receiver

Name Description
Table

Parameters

Name Description
context: Module

ReturnValue

Name Description
Module