Class ExportableFunction
- java.lang.Object
-
- de.mirkosertic.bytecoder.core.backend.wasm.ast.Container
-
- de.mirkosertic.bytecoder.core.backend.wasm.ast.Function
-
- de.mirkosertic.bytecoder.core.backend.wasm.ast.ExportableFunction
-
- All Implemented Interfaces:
Callable,Exportable,Importable
public class ExportableFunction extends Function implements Exportable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classExportableFunction.DefaultExportContext
-
Field Summary
Fields Modifier and Type Field Description private LocalIndexlocalIndex
-
Constructor Summary
Constructors Constructor Description ExportableFunction(Module aModule, FunctionType functionType, java.lang.String label)ExportableFunction(Module aModule, FunctionType functionType, java.lang.String label, WasmType result)ExportableFunction(Module aModule, FunctionType functionType, java.lang.String label, java.util.List<Param> params)ExportableFunction(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 voidexportAs(java.lang.String functionName)LocallocalByLabel(java.lang.String label)LocalIndexlocalIndex()LocalnewLocal(java.lang.String label, WasmType type)ExportableFunctiontoTable()voidwriteCodeTo(BinaryWriter.Writer sectionWriter, FunctionIndex functionIndex)voidwriteRefTo(TextWriter textWriter)voidwriteTo(TextWriter textWriter, Module aModule, WasmValue.ExportContext exportContext)-
Methods inherited from class de.mirkosertic.bytecoder.core.backend.wasm.ast.Function
getFunctionType, getLabel, getModule, getParams, getResultType, resolveIndex, resolveResultType
-
Methods inherited from class de.mirkosertic.bytecoder.core.backend.wasm.ast.Container
addChild, end, findByLabelInHierarchy, getChildren, hasChildren, parent, relativeDepthTo, relativeDepthTo
-
-
-
-
Field Detail
-
localIndex
private final LocalIndex localIndex
-
-
Constructor Detail
-
ExportableFunction
ExportableFunction(Module aModule, FunctionType functionType, java.lang.String label, java.util.List<Param> params, WasmType result)
-
ExportableFunction
ExportableFunction(Module aModule, FunctionType functionType, java.lang.String label, java.util.List<Param> params)
-
ExportableFunction
ExportableFunction(Module aModule, FunctionType functionType, java.lang.String label, WasmType result)
-
ExportableFunction
ExportableFunction(Module aModule, FunctionType functionType, java.lang.String label)
-
-
Method Detail
-
exportAs
public void exportAs(java.lang.String functionName)
-
localByLabel
public Local localByLabel(java.lang.String label)
-
localIndex
public LocalIndex localIndex()
-
writeTo
public void writeTo(TextWriter textWriter, Module aModule, WasmValue.ExportContext exportContext) throws java.io.IOException
- Specified by:
writeToin interfaceImportable- Overrides:
writeToin classFunction- Throws:
java.io.IOException
-
writeRefTo
public void writeRefTo(TextWriter textWriter)
- Specified by:
writeRefToin interfaceExportable
-
writeCodeTo
public void writeCodeTo(BinaryWriter.Writer sectionWriter, FunctionIndex functionIndex) throws java.io.IOException
- Throws:
java.io.IOException
-
toTable
public ExportableFunction toTable()
-
-