make Nim take roughly 100MB less RAM for bootstrapping via a new compiler switch -d:leanCompiler; useful for the Raberry PI

This commit is contained in:
Andreas Rumpf 2018-11-07 18:36:45 +01:00
commit cb4d810659
8 changed files with 110 additions and 63 deletions

View file

@ -9,9 +9,12 @@
import
intsets, ast, astalgo, msgs, renderer, magicsys, types, idents, trees,
wordrecg, strutils, options, guards, writetracking, lineinfos, semfold,
wordrecg, strutils, options, guards, lineinfos, semfold,
modulegraphs
when not defined(leanCompiler):
import writetracking
when defined(useDfa):
import dfa
@ -713,7 +716,7 @@ proc track(tracked: PEffects, n: PNode) =
track(tracked, n.sons[i])
of nkCallKinds:
if getConstExpr(tracked.owner_module, n, tracked.graph) != nil:
return
return
# p's effects are ours too:
var a = n.sons[0]
let op = a.typ