Class WasmOptions
java.lang.Object
de.inetsoftware.jwebassembly.module.WasmOptions
The option/properties for the behavior of the compiler.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate FunctionNameprivate FunctionNameprivate SyntheticFunctionNameprivate final boolean(package private) final FunctionManagerprivate FunctionNameprivate SyntheticFunctionName(package private) final CodeOptimizerNonGC function for ref_eq polyfill.private final Stringfinal StringManagerfinal TypeManagerprivate final booleanprivate final boolean -
Constructor Summary
ConstructorsConstructorDescriptionWasmOptions(HashMap<String, String> properties) Create a new instance of options -
Method Summary
Modifier and TypeMethodDescriptionbooleanProperty for adding debug names to the output if true.(package private) FunctionNameGet the FunctionName for a virtual call and mark it as used.(package private) FunctionNameGet the FunctionName for a virtual call and mark it as used.(package private) SyntheticFunctionNamegetCast()Get the FunctionName for a CAST operation and mark it as used.(package private) SyntheticFunctionNameGet the FunctionName for an INSTANCEOF check and mark it as used.Get the relative path between the final wasm file location and the source files location.(package private) voidRegister FunctionName "NonGC.get_i32" for frequently access to vtable with non GC mode.booleanuseEH()If the exception handling feature of WASM should be use or an unreachable instruction.booleanuseGC()If the GC feature of WASM should be use or the GC of the JavaScript host.
-
Field Details
-
functions
-
types
-
strings
-
optimizer
-
debugNames
private final boolean debugNames -
useGC
private final boolean useGC -
useEH
private final boolean useEH -
sourceMapBase
-
ref_eq
NonGC function for ref_eq polyfill. -
get_i32
-
callVirtual
-
callInterface
-
instanceOf
-
cast
-
-
Constructor Details
-
WasmOptions
-
-
Method Details
-
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
-
registerGet_i32
void registerGet_i32()Register FunctionName "NonGC.get_i32" for frequently access to vtable with non GC mode. -
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
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
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
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
-