summary refs log tree commit diff stats
path: root/compiler/passaux.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/passaux.nim')
-rw-r--r--compiler/passaux.nim18
1 files changed, 8 insertions, 10 deletions
diff --git a/compiler/passaux.nim b/compiler/passaux.nim
index 155b956df..af507d210 100644
--- a/compiler/passaux.nim
+++ b/compiler/passaux.nim
@@ -10,7 +10,7 @@
 ## implements some little helper passes
 
 import
-  ast, passes, idents, msgs, options, idgen, lineinfos
+  ast, passes, msgs, options, lineinfos
 
 from modulegraphs import ModuleGraph, PPassContext
 
@@ -18,18 +18,16 @@ type
   VerboseRef = ref object of PPassContext
     config: ConfigRef
 
-proc verboseOpen(graph: ModuleGraph; s: PSym): PPassContext =
-  #MessageOut('compiling ' + s.name.s);
-  result = VerboseRef(config: graph.config)
-  rawMessage(graph.config, hintProcessing, s.name.s)
+proc verboseOpen(graph: ModuleGraph; s: PSym; idgen: IdGenerator): PPassContext =
+  # xxx consider either removing this or keeping for documentation for how to add a pass
+  result = VerboseRef(config: graph.config, idgen: idgen)
+
+import std/objectdollar
 
 proc verboseProcess(context: PPassContext, n: PNode): PNode =
+  # called from `process` in `processTopLevelStmt`.
   result = n
   let v = VerboseRef(context)
-  if v.config.verbosity == 3:
-    # system.nim deactivates all hints, for verbosity:3 we want the processing
-    # messages nonetheless, so we activate them again (but honor cmdlineNotes)
-    v.config.setNote(hintProcessing)
-    message(v.config, n.info, hintProcessing, $idgen.gFrontEndId)
+  message(v.config, n.info, hintProcessingStmt, $v.idgen[])
 
 const verbosePass* = makePass(open = verboseOpen, process = verboseProcess)