Class Function

  • Direct Known Subclasses:
    ImportFunction

    class Function
    extends SectionEntry
    An entry in the function section of the WebAssembly.
    • 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • id

        int id
      • typeId

        int typeId
      • paramNames

        java.util.List<java.lang.String> paramNames
      • sourceMappings

        java.util.ArrayList<SourceMapping> sourceMappings
    • Constructor Detail

      • Function

        Function()
    • Method Detail

      • writeSectionEntry

        void writeSectionEntry​(WasmOutputStream stream)
                        throws java.io.IOException
        Write this single entry to a section
        Specified by:
        writeSectionEntry in class SectionEntry
        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 stream
        javaSourceLine - the position in the Java Source file
        sourceFileName - 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