Class WasmOptions
java.lang.Object
de.inetsoftware.jwebassembly.module.WasmOptions
The option/properties for the behavior of the compiler.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate FunctionName
private FunctionName
private SyntheticFunctionName
private final boolean
(package private) final FunctionManager
private FunctionName
private SyntheticFunctionName
(package private) final CodeOptimizer
NonGC function for ref_eq polyfill.private final String
final StringManager
final TypeManager
private final boolean
private final boolean
-
Constructor Summary
ConstructorsConstructorDescriptionWasmOptions
(HashMap<String, String> properties) Create a new instance of options -
Method Summary
Modifier and TypeMethodDescriptionboolean
Property for adding debug names to the output if true.(package private) FunctionName
Get the FunctionName for a virtual call and mark it as used.(package private) FunctionName
Get the FunctionName for a virtual call and mark it as used.(package private) SyntheticFunctionName
getCast()
Get the FunctionName for a CAST operation and mark it as used.(package private) SyntheticFunctionName
Get 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) void
Register FunctionName "NonGC.get_i32" for frequently access to vtable with non GC mode.boolean
useEH()
If the exception handling feature of WASM should be use or an unreachable instruction.boolean
useGC()
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
Create a new instance of options- Parameters:
properties
- compiler properties
-
-
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
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
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
-