Minor restructure and fixes; README; Proposed binaryen additions

This commit is contained in:
dcodeIO
2017-12-10 21:59:45 +01:00
parent 5ff88e126e
commit 0228ab91d9
13 changed files with 391 additions and 72 deletions

View File

@ -66,7 +66,7 @@ if (args.help || args._.length < 1) {
"",
"Examples: asc hello.ts",
" asc hello.ts -b hello.wasm -t hello.wast -a hello.js",
" asc hello.ts -b > hello.wasm",
" asc hello1.ts hello2.ts -b -O > hello.wasm",
"",
"Options:"
].concat(options).join("\n"));
@ -145,6 +145,10 @@ if (args.trapMode === "clamp")
module.runPasses([ "trap-mode-clamp" ]);
else if (args.trapMode === "js")
module.runPasses([ "trap-mode-js" ]);
else if (args.trapMode !== "allow") {
console.log("Unsupported trap mode: " + args.trapMode);
process.exit(1);
}
if (args.optimize)
module.optimize();