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 de.inetsoftware.jwebassembly.module.WasmInstruction
WasmInstruction.Type
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate LocaleVariableManager
private int
private 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.StructType
Get the type of this.(package private) int
Get the variable index on which this can be found.(package private) abstract boolean
if this call is executed virtual or if is was optimized.(package private) void
setVariableSlotOfThis
(int tempVarSlot, LocaleVariableManager localVariables) Set the Java variable slot on which THIS can be found.Methods inherited from class de.inetsoftware.jwebassembly.module.WasmCallInstruction
getFunctionName, getPopCount, getPopValueTypes, getPushValueType, getType, getTypeManager, writeTo
Methods inherited from class de.inetsoftware.jwebassembly.module.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
TypeManager.StructType getThisType()Get the type of this.- Returns:
- the type
-
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
-