More TLSF

This commit is contained in:
dcodeIO
2018-01-16 17:52:48 +01:00
parent 867e037ff0
commit 7d5e56cef5
6 changed files with 324 additions and 221 deletions

View File

@ -167,6 +167,12 @@ else if (args.trapMode !== "allow") {
if (args.optimize)
module.optimize();
if (args.runPasses) {
if (typeof args.runPasses === "string")
args.runPasses = args.runPasses.split(",");
module.runPasses(args.runPasses.map(pass => pass.trim()));
}
var hasOutput = false;
if (args.outFile != null) {

View File

@ -58,11 +58,15 @@
"trapMode": {
"desc": [
"Sets the trap mode to use.",
"allow Allow trapping operations. This is the default.",
"clamp Replace trapping operations with clamping semantics.",
"js Replace trapping operations with JS semantics."
" allow Allow trapping operations. This is the default.",
" clamp Replace trapping operations with clamping semantics.",
" js Replace trapping operations with JS semantics."
],
"type": "string",
"default": "allow"
},
"runPasses": {
"desc": "Specifies additional Binaryen passes to run.",
"type": "string"
}
}