Class WasmLoadStoreInstruction


class WasmLoadStoreInstruction extends WasmLocalInstruction
WasmInstruction for load and store local variables.
  • Constructor Details

    • WasmLoadStoreInstruction

      WasmLoadStoreInstruction(@Nonnull VariableOperator op, @Nonnegative int slot, LocaleVariableManager localVariables, int javaCodePos, int lineNumber)
      Create an instance of a load/store instruction
      Parameters:
      op - the operation
      slot - the memory/slot idx of the variable
      localVariables - the manager for local variables
      javaCodePos - the code position/offset in the Java method
      lineNumber - the line number in the Java source code
  • Method Details

    • getIndex

      int getIndex()
      Get the number of the locals
      Overrides:
      getIndex in class WasmLocalInstruction
      Returns:
      the index, mostly the Wasm Index
    • getSlot

      int getSlot()
      Get the slot of this variable from Java
      Overrides:
      getSlot in class WasmLocalInstruction
      Returns:
      the slot