summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2011-12-30 11:03:01 +0100
committerAraq <rumpf_a@web.de>2011-12-30 11:03:01 +0100
commit73919e3082e3bd7905f9a11a33fc54d641a10ac7 (patch)
treeb2b1b3185576aba3e45a84dad49b422cd7c839db /compiler
parenta26433b6ece813d8e14efe4f65b4be3a893c2116 (diff)
downloadNim-73919e3082e3bd7905f9a11a33fc54d641a10ac7.tar.gz
GC stack scanning cares about interior pointers
Diffstat (limited to 'compiler')
-rwxr-xr-xcompiler/c2nim/c2nim.nim3
-rwxr-xr-xcompiler/c2nim/cparse.nim2
-rwxr-xr-xcompiler/msgs.nim2
-rwxr-xr-xcompiler/nimrod.nim12
4 files changed, 11 insertions, 8 deletions
diff --git a/compiler/c2nim/c2nim.nim b/compiler/c2nim/c2nim.nim
index 6d7a0d6c1..e408467ef 100755
--- a/compiler/c2nim/c2nim.nim
+++ b/compiler/c2nim/c2nim.nim
@@ -44,7 +44,8 @@ proc main(infile, outfile: string, options: PParserOptions) =
   var module = parseUnit(p)
   closeParser(p)
   renderModule(module, outfile)
-  rawMessage(hintSuccessX, [$gLinesCompiled, $(getTime() - start)])
+  rawMessage(hintSuccessX, [$gLinesCompiled, $(getTime() - start), 
+                            formatSize(getTotalMem())])
 
 var
   infile = ""
diff --git a/compiler/c2nim/cparse.nim b/compiler/c2nim/cparse.nim
index f8f58347d..7be9d71c1 100755
--- a/compiler/c2nim/cparse.nim
+++ b/compiler/c2nim/cparse.nim
@@ -1594,7 +1594,7 @@ proc parseSwitch(p: var TParser): PNode =
   eat(p, pxCurlyRi)
 
 proc addStmt(sl, a: PNode) = 
-  # merge type sections is possible:
+  # merge type sections if possible:
   if a.kind != nkTypeSection or sonsLen(sl) == 0 or
       lastSon(sl).kind != nkTypeSection:
     addSon(sl, a)
diff --git a/compiler/msgs.nim b/compiler/msgs.nim
index 08bf74406..50afd47f9 100755
--- a/compiler/msgs.nim
+++ b/compiler/msgs.nim
@@ -344,7 +344,7 @@ const
     warnWriteToForeignHeap: "write to foreign heap [WriteToForeignHeap]",
     warnUser: "$1 [User]", 
     hintSuccess: "operation successful [Success]", 
-    hintSuccessX: "operation successful ($1 lines compiled; $2 sec total) [SuccessX]", 
+    hintSuccessX: "operation successful ($# lines compiled; $# sec total; $#) [SuccessX]", 
     hintLineTooLong: "line too long [LineTooLong]", 
     hintXDeclaredButNotUsed: "\'$1\' is declared but not used [XDeclaredButNotUsed]", 
     hintConvToBaseNotNeeded: "conversion to base object is not needed [ConvToBaseNotNeeded]", 
diff --git a/compiler/nimrod.nim b/compiler/nimrod.nim
index 24dbc0617..a6918ce63 100755
--- a/compiler/nimrod.nim
+++ b/compiler/nimrod.nim
@@ -61,9 +61,9 @@ proc prependCurDir(f: string): string =
   else:
     result = f
 
-proc HandleCmdLine() = 
+proc HandleCmdLine() =
   var start = epochTime()
-  if paramCount() == 0: 
+  if paramCount() == 0:
     writeCommandLineUsage()
   else:
     # Process command line arguments:
@@ -85,13 +85,15 @@ proc HandleCmdLine() =
     ProcessCmdLine(passCmd2)
     MainCommand()
     if gVerbosity >= 2: echo(GC_getStatistics())
+    #echo(GC_getStatistics())
     if msgs.gErrorCounter == 0:
       when hasTinyCBackend:
         if gCmd == cmdRun:
           tccgen.run()
-      if gCmd notin {cmdInterpret, cmdRun}: 
-        rawMessage(hintSuccessX, [$gLinesCompiled, 
-                   formatFloat(epochTime() - start, ffDecimal, 3)])
+      if gCmd notin {cmdInterpret, cmdRun}:
+        rawMessage(hintSuccessX, [$gLinesCompiled,
+                   formatFloat(epochTime() - start, ffDecimal, 3),
+                   formatSize(getTotalMem())])
       if optRun in gGlobalOptions:
         var ex = quoteIfContainsWhite(
             changeFileExt(gProjectFull, "").prependCurDir)