JS codegen enhancements; still unusable

This commit is contained in:
Araq 2012-07-01 19:35:19 +02:00
commit fe285b354d
9 changed files with 223 additions and 59 deletions

View file

@ -98,9 +98,14 @@ proc HandleCmdLine() =
formatFloat(epochTime() - start, ffDecimal, 3),
formatSize(getTotalMem())])
if optRun in gGlobalOptions:
var ex = quoteIfContainsWhite(
if gCmd == cmdCompileToEcmaScript:
var ex = quoteIfContainsWhite(
completeCFilePath(changeFileExt(gProjectFull, "js").prependCurDir))
execExternalProgram("node " & ex & ' ' & arguments)
else:
var ex = quoteIfContainsWhite(
changeFileExt(gProjectFull, exeExt).prependCurDir)
execExternalProgram(ex & ' ' & arguments)
execExternalProgram(ex & ' ' & arguments)
#GC_disableMarkAndSweep()