ElementSegment
data class ElementSegment
Fields
Constructors
<init>
constructor(tableIndex: Index<Table>, offset: Offset, init: List<Index<Function>>)
Representation of an element segment for a table.
From the docs:
The initial contents of a table is uninitialized. The elem component of a module defines a
vector of element segments that initialize a subrange of a table, at a given offset, from a
static vector of elements.
elem ::= {table tableidx, offset expr, init vec(funcidx)}
The offset is given by a constant expression.
Note: In the current version of WebAssembly, at most one table is allowed in a module.
Consequently, the only valid tableidx is 0.
Extensions
validate
fun ElementSegment.validate(context: Module): Module
Validates the ElementSegment node.
Receiver
| Name | Description |
|---|---|
ElementSegment
|
Parameters
| Name | Description |
|---|---|
context: Module
|
ReturnValue
| Name | Description |
|---|---|
Module
|
Representation of an element segment for a table.
From the docs:
The initial contents of a table is uninitialized. The
elemcomponent of a module defines a vector of element segments that initialize a subrange of a table, at a given offset, from a static vector of elements.The
offsetis given by a constant expression.Note: In the current version of WebAssembly, at most one table is allowed in a module. Consequently, the only valid
tableidxis0.