Skip to content

Commit cd80eee

Browse files
committed
clean up code
1 parent c6a5a83 commit cd80eee

File tree

2 files changed

+7
-27
lines changed

2 files changed

+7
-27
lines changed

compiler/nimconf.nim

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -349,20 +349,20 @@ proc canUseCache(cfg: RelativeFile; cache: IdentCache; conf: ConfigRef; idgen: I
349349
if cachedCfgFiles.len == 0:
350350
result = false
351351
else:
352-
echo formatFloat(epochTime() - conf.lastCmdTime, ffDecimal, 3), " checking added config"
352+
#echo formatFloat(epochTime() - conf.lastCmdTime, ffDecimal, 3), " checking added config"
353353
loadConfigsImpl(cfg, cache, conf, idgen, cachedCfgFiles)
354-
echo formatFloat(epochTime() - conf.lastCmdTime, ffDecimal, 3), " done checking added config"
354+
#echo formatFloat(epochTime() - conf.lastCmdTime, ffDecimal, 3), " done checking added config"
355355
result = cachedCfgFiles.len != 0
356356

357357
proc loadConfigs*(cfg: RelativeFile; cache: IdentCache; conf: ConfigRef; idgen: IdGenerator) =
358-
conf.lastCmdTime = epochTime()
358+
#conf.lastCmdTime = epochTime()
359359
var cachedCfgFiles = HashSet[string]()
360360
if canUseCache(cfg, cache, conf, idgen, cachedCfgFiles):
361-
echo formatFloat(epochTime() - conf.lastCmdTime, ffDecimal, 3), " loading cached config"
361+
#echo formatFloat(epochTime() - conf.lastCmdTime, ffDecimal, 3), " loading cached config"
362362
loadConfigsFromCache(conf)
363-
echo formatFloat(epochTime() - conf.lastCmdTime, ffDecimal, 3), " done loading cached config"
363+
#echo formatFloat(epochTime() - conf.lastCmdTime, ffDecimal, 3), " done loading cached config"
364364
else:
365-
echo formatFloat(epochTime() - conf.lastCmdTime, ffDecimal, 3), " evaluating config files"
365+
#echo formatFloat(epochTime() - conf.lastCmdTime, ffDecimal, 3), " evaluating config files"
366366
loadConfigsImpl(cfg, cache, conf, idgen, cachedCfgFiles)
367-
echo formatFloat(epochTime() - conf.lastCmdTime, ffDecimal, 3), " done evaluating config files"
367+
#echo formatFloat(epochTime() - conf.lastCmdTime, ffDecimal, 3), " done evaluating config files"
368368
storeConfigs(conf)

compiler/nimconfcache.nim

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,10 @@ proc configToNif(conf: ConfigRef; dest: var TokenBuf) =
123123
dest.addStrLit $conf.target.targetOS
124124
dest.addStrLit $conf.target.targetCPU
125125

126-
#echo "conf.options"
127-
#echo conf.options
128126
dest.buildTree "options":
129127
for opt in conf.options:
130128
dest.addStrLit $opt
131129

132-
#echo "conf.globalOptions"
133-
#echo conf.globalOptions
134130
dest.buildTree "globalOptions":
135131
for opt in conf.globalOptions:
136132
dest.addStrLit $opt
@@ -146,30 +142,18 @@ proc configToNif(conf: ConfigRef; dest: var TokenBuf) =
146142
dest.addStrLit $conf.filenameOption
147143
dest.addStrLit conf.unitSep
148144

149-
#echo "conf.selectedGC"
150-
#echo conf.selectedGC
151145
dest.addStrLit $conf.selectedGC
152146

153-
#echo "conf.exc"
154-
#echo conf.exc
155147
dest.addStrLit $conf.exc
156148

157149
dest.addIntLit conf.hintProcessingDots.int
158150

159-
#echo "conf.verbosity"
160-
#echo conf.verbosity
161151
dest.addIntLit conf.verbosity
162152

163-
#echo "conf.numberOfProcessors"
164-
#echo conf.numberOfProcessors
165153
dest.addIntLit conf.numberOfProcessors
166154

167-
#echo "conf.spellSuggestMax"
168-
#echo conf.spellSuggestMax
169155
dest.addIntLit conf.spellSuggestMax
170156

171-
#echo "conf.nimbasePattern"
172-
#echo conf.nimbasePattern
173157
dest.addStrLit conf.nimbasePattern
174158

175159
dest.buildTree "features":
@@ -327,16 +311,12 @@ proc loadConfigsFromNif(conf: ConfigRef; n: var Cursor) =
327311
inc n
328312
conf.verbosity = pool.integers[n.intId]
329313
inc n
330-
#echo conf.verbosity
331314
conf.numberOfProcessors = pool.integers[n.intId]
332315
inc n
333-
#echo conf.numberOfProcessors
334316
conf.spellSuggestMax = pool.integers[n.intId]
335317
inc n
336-
#echo conf.spellSuggestMax
337318
conf.nimbasePattern = pool.strings[n.litId]
338319
inc n
339-
#echo conf.nimbasePattern
340320

341321
fromNif conf.features, "features", n
342322
fromNif conf.legacyFeatures, "legacyFeatures", n

0 commit comments

Comments
 (0)