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 FunctionTypefunctionTypeprivate java.lang.Stringlabelprivate Modulemoduleprivate java.util.List<Param>paramsprivate WasmTyperesultType
-
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 WasmTypegetFunctionType()java.lang.StringgetLabel()protected ModulegetModule()java.util.List<Param>getParams()WasmTypegetResultType()intresolveIndex(WasmValue.ExportContext context)WasmTyperesolveResultType(WasmValue.ExportContext context)FunctiontoTable()voidwriteTo(TextWriter textWriter, Module aModule, WasmValue.ExportContext exportContext)-
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, WasmValue.ExportContext exportContext) throws java.io.IOException
- Specified by:
writeToin 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:
resolveResultTypein interfaceCallable
-
resolveIndex
public int resolveIndex(WasmValue.ExportContext context)
- Specified by:
resolveIndexin interfaceCallable
-
-