review and merge zahary's work (#5849)

* proper indentation for the generated JS code
* improved dead-code elimination for JavaScript
* test the JS dead-code elimination

A new test spec has been added - "maxcodesize". It specifies the
maximum size of the generated code in bytes.
This commit is contained in:
zah 2017-06-03 13:45:10 +03:00 • committed by Andreas Rumpf
commit 39aef12446
7 changed files with 308 additions and 187 deletions

View file

@ -186,6 +186,9 @@ var
const oKeepVariableNames* = true
template compilingLib*: bool =
gGlobalOptions * {optGenGuiApp, optGenDynLib} != {}
proc mainCommandArg*: string =
## This is intended for commands like check or parse
## which will work on the main project file unless