Class WasmOptions


  • public class WasmOptions
    extends java.lang.Object
    The option/properties for the behavior of the compiler.
    • Constructor Detail

      • WasmOptions

        public WasmOptions​(java.util.HashMap<java.lang.String,​java.lang.String> properties)
        Create a new instance of options
        Parameters:
        properties - compiler properties
    • Method Detail

      • debugNames

        public boolean debugNames()
        Property for adding debug names to the output if true.
        Returns:
        true, add debug information
      • useGC

        public boolean useGC()
        If the GC feature of WASM should be use or the GC of the JavaScript host.
        Returns:
        true, use the GC instructions of WASM.
      • useEH

        public boolean useEH()
        If the exception handling feature of WASM should be use or an unreachable instruction.
        Returns:
        true, use the EH instructions of WASM; false, generate an unreachable instruction
      • getSourceMapBase

        @Nonnull
        public java.lang.String getSourceMapBase()
        Get the relative path between the final wasm file location and the source files location. If not empty it should end with a slash like "../../src/main/java/".
        Returns:
        the path
      • registerGet_i32

        void registerGet_i32()
        Register FunctionName "NonGC.get_i32" for frequently access to vtable with non GC mode.
      • getCallVirtual

        @Nonnull
        FunctionName getCallVirtual()
        Get the FunctionName for a virtual call and mark it as used. The function has 2 parameters (THIS, virtualfunctionIndex) and returns the index of the function.
        Returns:
        the name
      • getCallInterface

        @Nonnull
        FunctionName getCallInterface()
        Get the FunctionName for a virtual call and mark it as used. The function has 2 parameters (THIS, virtualfunctionIndex) and returns the index of the function.
        Returns:
        the name
      • getInstanceOf

        @Nonnull
        SyntheticFunctionName getInstanceOf()
        Get the FunctionName for an INSTANCEOF check and mark it as used. The function has 2 parameters (THIS, classIndex) and returns true or false.
        Returns:
        the name
      • getCast

        @Nonnull
        SyntheticFunctionName getCast()
        Get the FunctionName for a CAST operation and mark it as used. The function has 2 parameters (THIS, classIndex) and returns THIS or throw an exception.
        Returns:
        the name