summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAdam Strzelecki <ono@java.pl>2015-06-06 11:42:31 +0200
committerAdam Strzelecki <ono@java.pl>2015-07-03 14:05:00 +0200
commit3c20747394b9000afaec5c3416c8579d8c281b56 (patch)
tree7b018f5c1fbf956d517045c50e574a2f93251a6f
parentc009aadc74f6ad778a15afda47a4aa635b52921a (diff)
downloadNim-3c20747394b9000afaec5c3416c8579d8c281b56.tar.gz
Turn GC_getStatistics into hintGCStats
-rw-r--r--compiler/msgs.nim13
-rw-r--r--compiler/nim.nim2
2 files changed, 9 insertions, 6 deletions
diff --git a/compiler/msgs.nim b/compiler/msgs.nim
index 11351ac03..f1d1029e4 100644
--- a/compiler/msgs.nim
+++ b/compiler/msgs.nim
@@ -127,7 +127,7 @@ type
     hintProcessing, hintCodeBegin, hintCodeEnd, hintConf, hintPath,
     hintConditionAlwaysTrue, hintName, hintPattern,
     hintExecuting, hintLinking, hintDependency,
-    hintSource, hintStackTrace,
+    hintSource, hintStackTrace, hintGCStats,
     hintUser
 
 const
@@ -423,6 +423,7 @@ const
     hintDependency: "$1",
     hintSource: "$1",
     hintStackTrace: "$1",
+    hintGCStats: "$1",
     hintUser: "$1"]
 
 const
@@ -438,11 +439,11 @@ const
     "ProveInit", "ProveField", "ProveIndex", "GcUnsafe", "GcUnsafe2", "Uninit",
     "GcMem", "Destructor", "LockLevel", "ResultShadowed", "User"]
 
-  HintsToStr*: array[0..21, string] = ["Success", "SuccessX", "LineTooLong",
+  HintsToStr*: array[0..22, string] = ["Success", "SuccessX", "LineTooLong",
     "XDeclaredButNotUsed", "ConvToBaseNotNeeded", "ConvFromXtoItselfNotNeeded",
     "ExprAlwaysX", "QuitCalled", "Processing", "CodeBegin", "CodeEnd", "Conf",
     "Path", "CondTrue", "Name", "Pattern", "Exec", "Link", "Dependency",
-    "Source", "StackTrace",
+    "Source", "StackTrace", "GCStats",
     "User"]
 
 const
@@ -503,14 +504,16 @@ const
                                          hintDependency,
                                          hintExecuting, hintLinking,
                                          hintCodeBegin, hintCodeEnd,
-                                         hintSource, hintStackTrace},
+                                         hintSource, hintStackTrace,
+                                         hintGCStats},
     {low(TNoteKind)..high(TNoteKind)} - {warnShadowIdent, warnUninit,
                                          warnProveField, warnProveIndex,
                                          warnGcUnsafe,
                                          hintDependency,
                                          hintExecuting,
                                          hintCodeBegin, hintCodeEnd,
-                                         hintSource, hintStackTrace},
+                                         hintSource, hintStackTrace,
+                                         hintGCStats},
     {low(TNoteKind)..high(TNoteKind)} - {hintStackTrace},
     {low(TNoteKind)..high(TNoteKind)}]
 
diff --git a/compiler/nim.nim b/compiler/nim.nim
index 89db22e8f..5da87dfa3 100644
--- a/compiler/nim.nim
+++ b/compiler/nim.nim
@@ -59,7 +59,7 @@ proc handleCmdLine() =
     extccomp.initVars()
     processCmdLine(passCmd2, "")
     mainCommand()
-    if gVerbosity >= 2: echo(GC_getStatistics())
+    if optHints in gOptions and hintGCStats in gNotes: echo(GC_getStatistics())
     #echo(GC_getStatistics())
     if msgs.gErrorCounter == 0:
       when hasTinyCBackend: