DataSegment
data class DataSegment
Constructors
<init>
constructor(memoryIndex: Index<Memory>, offset: Offset, init: ByteArray)
From the docs:
The initial contents of a memory are zero-valued bytes. The data component of a module defines
a vector of data segments that initialize a range of memory, at a given offset, with a static
vector of bytes.
data ::= { data memidx, offset expr, init vec(byte)}
The offset is given by a constant expression.
Note: In the current version of WebAssembly, at most one memory is allowed in a module.
Consequently, the only valid memidx is 0.
Methods
equals
fun equals(other: Any?): Boolean
Parameters
| Name | Description |
|---|---|
other: Any?
|
ReturnValue
| Name | Description |
|---|---|
Boolean
|
hashCode
fun hashCode(): Int
ReturnValue
| Name | Description |
|---|---|
Int
|
Extensions
validate
fun DataSegment.validate(context: Module): Module
Validates the DataSegment node.
Receiver
| Name | Description |
|---|---|
DataSegment
|
Parameters
| Name | Description |
|---|---|
context: Module
|
ReturnValue
| Name | Description |
|---|---|
Module
|
From the docs:
The initial contents of a memory are zero-valued bytes. The
datacomponent of a module defines a vector of data segments that initialize a range of memory, at a given offset, with a static vector of bytes.The
offsetis given by a constant expression.Note: In the current version of WebAssembly, at most one memory is allowed in a module. Consequently, the only valid
memidxis0.