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

10
tests/js/tjshello.nim Normal file
View file

@ -0,0 +1,10 @@
discard """
output: "Hello World"
maxcodesize: 1000
ccodecheck: "!@'function'"
"""
import jsconsole
console.log "Hello World"