Class Function
- java.lang.Object
-
- de.inetsoftware.jwebassembly.binary.SectionEntry
-
- de.inetsoftware.jwebassembly.binary.Function
-
- Direct Known Subclasses:
ImportFunction
class Function extends SectionEntry
An entry in the function section of the WebAssembly.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) WasmOutputStream
functionsStream
(package private) int
id
(package private) java.util.List<java.lang.String>
paramNames
(package private) java.util.ArrayList<SourceMapping>
sourceMappings
(package private) int
typeId
-
Constructor Summary
Constructors Constructor Description Function()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
addCodeOffset(int offset)
Add an offset to the marked code position in the source map(package private) void
markCodePosition(int streamPosition, int javaSourceLine, java.lang.String sourceFileName)
Add code position marker for a source map.(package private) void
writeSectionEntry(WasmOutputStream stream)
Write this single entry to a section
-
-
-
Field Detail
-
id
int id
-
typeId
int typeId
-
paramNames
java.util.List<java.lang.String> paramNames
-
functionsStream
WasmOutputStream functionsStream
-
sourceMappings
java.util.ArrayList<SourceMapping> sourceMappings
-
-
Method Detail
-
writeSectionEntry
void writeSectionEntry(WasmOutputStream stream) throws java.io.IOException
Write this single entry to a section- Specified by:
writeSectionEntry
in classSectionEntry
- Parameters:
stream
- the target- Throws:
java.io.IOException
- if any I/O error occur
-
markCodePosition
void markCodePosition(int streamPosition, int javaSourceLine, java.lang.String sourceFileName)
Add code position marker for a source map.- Parameters:
streamPosition
- the position in the function streamjavaSourceLine
- the position in the Java Source filesourceFileName
- the name of the Java source file
-
addCodeOffset
void addCodeOffset(int offset)
Add an offset to the marked code position in the source map- Parameters:
offset
- the offset
-
-