Elem

zio.wasm.Elem
final case class Elem(refType: RefType, init: Chunk[Expr], mode: ElemMode) extends Section[CoreIndexSpace]

The initial contents of a table is uninitialized. Element segments can be used to initialize a subrange of a table from a static vector of elements.

The elems component of a module defines a vector of element segments. Each element segment defines a reference type and a corresponding list of constant element expressions.

Element segments have a mode that identifies them as either passive, active, or declarative. A passive element segment’s elements can be copied to a table using the table.init instruction. An active element segment copies its elements into a table during instantiation, as specified by a table index and a constant expression defining an offset into that table. A declarative element segment is not available at runtime but merely serves to forward-declare references that are formed in code with instructions like ref.func.

Element segments are referenced through element indices.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

Attributes

Definition Classes

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product