Class WasmCallIndirectInstruction
java.lang.Object
de.inetsoftware.jwebassembly.module.WasmInstruction
de.inetsoftware.jwebassembly.module.WasmCallInstruction
de.inetsoftware.jwebassembly.module.WasmCallIndirectInstruction
- Direct Known Subclasses:
WasmCallInterfaceInstruction, WasmCallVirtualInstruction
WasmInstruction for a function call.
-
Nested Class Summary
Nested classes/interfaces inherited from class WasmInstruction
WasmInstruction.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate LocaleVariableManagerprivate intprivate final TypeManager.StructType -
Constructor Summary
ConstructorsConstructorDescriptionWasmCallIndirectInstruction(FunctionName name, int javaCodePos, int lineNumber, TypeManager types) Create an instance of a function call instruction -
Method Summary
Modifier and TypeMethodDescription(package private) TypeManager.StructTypeGet the type of this.(package private) intGet the variable index on which this can be found.(package private) abstract booleanif this call is executed virtual or if is was optimized.(package private) voidsetVariableSlotOfThis(int tempVarSlot, LocaleVariableManager localVariables) Set the Java variable slot on which THIS can be found.Methods inherited from class WasmCallInstruction
getFunctionName, getPopCount, getPopValueTypes, getPushValueType, getType, getTypeManager, writeToMethods inherited from class WasmInstruction
getCodePosition, getLineNumber, setCodePosition
-
Field Details
-
type
-
tempVarSlot
private int tempVarSlot -
localVariables
-
-
Constructor Details
-
WasmCallIndirectInstruction
WasmCallIndirectInstruction(FunctionName name, int javaCodePos, int lineNumber, TypeManager types) Create an instance of a function call instruction- Parameters:
name- the function name that should be calledjavaCodePos- the code position/offset in the Java methodlineNumber- the line number in the Java source codetypes- the type manager
-
-
Method Details
-
getThisType
-
setVariableSlotOfThis
Set the Java variable slot on which THIS can be found.- Parameters:
tempVarSlot- the slotlocalVariables- the manager for local variables to resolve the index
-
getVariableIndexOfThis
int getVariableIndexOfThis()Get the variable index on which this can be found.- Returns:
- the index of the variable
-
isVirtual
abstract boolean isVirtual()if this call is executed virtual or if is was optimized.- Returns:
- true, virtual call
-