Add a getValue() to dup instruction

This commit is contained in:
Volker Berlin 2022-09-29 13:25:56 +02:00
parent 4c262a2ad1
commit 8b20e21725
No known key found for this signature in database
GPG Key ID: 988423EF815BE4CB

View File

@ -18,6 +18,8 @@ package de.inetsoftware.jwebassembly.module;
import java.io.IOException;
import javax.annotation.Nonnull;
import de.inetsoftware.jwebassembly.wasm.AnyType;
import de.inetsoftware.jwebassembly.wasm.VariableOperator;
@ -28,6 +30,7 @@ import de.inetsoftware.jwebassembly.wasm.VariableOperator;
*/
class DupThis extends WasmInstruction {
@Nonnull
private WasmCallIndirectInstruction virtualCall;
private int tempVarSlot;
@ -46,13 +49,22 @@ class DupThis extends WasmInstruction {
* @param javaCodePos
* the code position
*/
DupThis( WasmCallIndirectInstruction virtualCall, int tempVarSlot, LocaleVariableManager localVariables, int javaCodePos ) {
DupThis( @Nonnull WasmCallIndirectInstruction virtualCall, int tempVarSlot, LocaleVariableManager localVariables, int javaCodePos ) {
super( javaCodePos, virtualCall.getLineNumber() );
this.virtualCall = virtualCall;
this.tempVarSlot = tempVarSlot;
this.localVariables = localVariables;
}
/**
* Get the related virtual function call.
* @return the call
*/
@Nonnull
WasmCallIndirectInstruction getValue() {
return virtualCall;
}
/**
* {@inheritDoc}
*/