move debugNames into WasmOptions

This commit is contained in:
Volker Berlin 2019-09-10 17:52:14 +02:00
parent b4d2f6caa2
commit 50f10f1f47

View File

@ -26,6 +26,8 @@ import de.inetsoftware.jwebassembly.JWebAssembly;
*/ */
public class WasmOptions { public class WasmOptions {
private final boolean debugNames;
private final boolean useGC; private final boolean useGC;
/** /**
@ -35,9 +37,19 @@ public class WasmOptions {
* compiler properties * compiler properties
*/ */
public WasmOptions( HashMap<String, String> properties ) { public WasmOptions( HashMap<String, String> properties ) {
debugNames = Boolean.parseBoolean( properties.get( JWebAssembly.DEBUG_NAMES ) );
useGC = Boolean.parseBoolean( properties.getOrDefault( JWebAssembly.WASM_USE_GC, "false" ) ); useGC = Boolean.parseBoolean( properties.getOrDefault( JWebAssembly.WASM_USE_GC, "false" ) );
} }
/**
* Property for adding debug names to the output if true.
*
* @return true, add debug information
*/
public boolean debugNames() {
return debugNames;
}
/** /**
* If the GC feature of WASM should be use or the GC of the JavaScript host. * If the GC feature of WASM should be use or the GC of the JavaScript host.
* *