Class Function
- java.lang.Object
-
- de.mirkosertic.bytecoder.core.backend.wasm.ast.Container
-
- de.mirkosertic.bytecoder.core.backend.wasm.ast.Function
-
- All Implemented Interfaces:
Callable
,Importable
- Direct Known Subclasses:
ExportableFunction
public class Function extends Container implements Importable, Callable
-
-
Field Summary
Fields Modifier and Type Field Description private FunctionType
functionType
private java.lang.String
label
private Module
module
private java.util.List<Param>
params
private WasmType
resultType
-
Constructor Summary
Constructors Constructor Description Function(Module aModule, FunctionType functionType, java.lang.String label, WasmType result)
Function(Module aModule, FunctionType functionType, java.lang.String label, java.util.List<Param> params)
Function(Module aModule, FunctionType functionType, java.lang.String label, java.util.List<Param> params, WasmType result)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WasmType
getFunctionType()
java.lang.String
getLabel()
protected Module
getModule()
java.util.List<Param>
getParams()
WasmType
getResultType()
int
resolveIndex(WasmValue.ExportContext context)
WasmType
resolveResultType(WasmValue.ExportContext context)
Function
toTable()
void
writeTo(TextWriter textWriter, Module aModule)
-
Methods inherited from class de.mirkosertic.bytecoder.core.backend.wasm.ast.Container
addChild, end, findByLabelInHierarchy, getChildren, hasChildren, parent, relativeDepthTo, relativeDepthTo
-
-
-
-
Field Detail
-
module
private final Module module
-
functionType
private final FunctionType functionType
-
label
private final java.lang.String label
-
params
private final java.util.List<Param> params
-
resultType
private final WasmType resultType
-
-
Constructor Detail
-
Function
Function(Module aModule, FunctionType functionType, java.lang.String label, java.util.List<Param> params, WasmType result)
-
Function
Function(Module aModule, FunctionType functionType, java.lang.String label, java.util.List<Param> params)
-
Function
Function(Module aModule, FunctionType functionType, java.lang.String label, WasmType result)
-
-
Method Detail
-
writeTo
public void writeTo(TextWriter textWriter, Module aModule) throws java.io.IOException
- Specified by:
writeTo
in interfaceImportable
- Throws:
java.io.IOException
-
getModule
protected Module getModule()
-
getFunctionType
public WasmType getFunctionType()
-
getParams
public java.util.List<Param> getParams()
-
getResultType
public WasmType getResultType()
-
toTable
public Function toTable()
-
resolveResultType
public WasmType resolveResultType(WasmValue.ExportContext context)
- Specified by:
resolveResultType
in interfaceCallable
-
resolveIndex
public int resolveIndex(WasmValue.ExportContext context)
- Specified by:
resolveIndex
in interfaceCallable
-
-