diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2018-05-13 00:45:52 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-05-13 00:45:52 +0200 |
commit | 8ca5b71c6aead09fe78b31f4863d2b2c083ad075 (patch) | |
tree | aef38681c550a2e1f889b75f9e6aecdf3205e1a3 /compiler/passaux.nim | |
parent | 1284827df2f25d1d387d8325ef49248f22879db1 (diff) | |
download | Nim-8ca5b71c6aead09fe78b31f4863d2b2c083ad075.tar.gz |
the remaining passes all compile again
Diffstat (limited to 'compiler/passaux.nim')
-rw-r--r-- | compiler/passaux.nim | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/compiler/passaux.nim b/compiler/passaux.nim index 2065d5893..f0d6bd44a 100644 --- a/compiler/passaux.nim +++ b/compiler/passaux.nim @@ -10,22 +10,26 @@ ## implements some little helper passes import - strutils, ast, astalgo, passes, idents, msgs, options, idgen + strutils, ast, astalgo, passes, idents, msgs, options, idgen, configuration from modulegraphs import ModuleGraph +type + VerboseRef = ref object of TPassContext + config: ConfigRef + proc verboseOpen(graph: ModuleGraph; s: PSym; cache: IdentCache): PPassContext = #MessageOut('compiling ' + s.name.s); - result = nil # we don't need a context - rawMessage(hintProcessing, s.name.s) + result = VerboseRef(config: graph.config) + rawMessage(graph.config, hintProcessing, s.name.s) proc verboseProcess(context: PPassContext, n: PNode): PNode = result = n - if context != nil: internalError("logpass: context is not nil") + let v = VerboseRef(context) if gVerbosity == 3: # system.nim deactivates all hints, for verbosity:3 we want the processing # messages nonetheless, so we activate them again unconditionally: - incl(msgs.gNotes, hintProcessing) - message(n.info, hintProcessing, $idgen.gFrontendId) + incl(v.config.notes, hintProcessing) + message(v.config, n.info, hintProcessing, $idgen.gFrontendId) const verbosePass* = makePass(open = verboseOpen, process = verboseProcess) |