Class ActiveElement

java.lang.Object
com.dylibso.chicory.wasm.types.Element
com.dylibso.chicory.wasm.types.ActiveElement

public final class ActiveElement extends Element
An active element. An active element copies its elements into a table during initialization of that table.
  • Constructor Details

    • ActiveElement

      public ActiveElement(ValueType type, List<List<Instruction>> initializers, int tableIndex, List<Instruction> offset)
      Construct a new instance.
      Parameters:
      type - the type of the element values (must not be null)
      initializers - the list of instruction lists which are used to initialize each element in the range (must not be null)
      tableIndex - the index of the table which is to be initialized
      offset - the list of instructions which give the offset into the table (must not be null)
  • Method Details

    • tableIndex

      public int tableIndex()
      Returns:
      the table to actively initialize
    • offset

      public List<Instruction> offset()
      Returns:
      a constant expression defining the offset into the table