Class WasmLoadStoreInstruction
java.lang.Object
de.inetsoftware.jwebassembly.module.WasmInstruction
de.inetsoftware.jwebassembly.module.WasmLocalInstruction
de.inetsoftware.jwebassembly.module.WasmLoadStoreInstruction
WasmInstruction for load and store local variables.
-
Nested Class Summary
Nested classes/interfaces inherited from class de.inetsoftware.jwebassembly.module.WasmInstruction
WasmInstruction.Type
-
Field Summary
Fields inherited from class de.inetsoftware.jwebassembly.module.WasmLocalInstruction
localVariables
-
Constructor Summary
ConstructorsConstructorDescriptionWasmLoadStoreInstruction
(VariableOperator op, int slot, LocaleVariableManager localVariables, int javaCodePos, int lineNumber) Create an instance of a load/store instruction -
Method Summary
Methods inherited from class de.inetsoftware.jwebassembly.module.WasmLocalInstruction
getOperator, getPopCount, getPopValueTypes, getPushValueType, getType, setOperator, writeTo
Methods inherited from class de.inetsoftware.jwebassembly.module.WasmInstruction
getCodePosition, getLineNumber, setCodePosition
-
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 operationslot
- the memory/slot idx of the variablelocalVariables
- the manager for local variablesjavaCodePos
- the code position/offset in the Java methodlineNumber
- the line number in the Java source code
-
-
Method Details
-
getIndex
int getIndex()Get the number of the locals- Overrides:
getIndex
in classWasmLocalInstruction
- Returns:
- the index, mostly the Wasm Index
-
getSlot
int getSlot()Get the slot of this variable from Java- Overrides:
getSlot
in classWasmLocalInstruction
- Returns:
- the slot
-