DataSegment

DataSegment

data class DataSegment

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.

Fields

Name Description
val memoryIndex: Index<Memory>
val offset: Offset
val init: ByteArray

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.

Parameters

Name Description
memoryIndex: Index<Memory>
offset: Offset
init: ByteArray

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