summary refs log tree commit diff stats
path: root/compiler/sempass2.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-11-07 18:36:45 +0100
committerAndreas Rumpf <rumpf_a@web.de>2018-11-07 18:36:52 +0100
commitcb4d81065967e9b40b1e488fc66f1d926f19f536 (patch)
tree1ceecf540330b20c2d73e765972cba349de0cc2e /compiler/sempass2.nim
parentd5e113c3a626d3c32eba39e513f08f0fc8f05bfe (diff)
downloadNim-cb4d81065967e9b40b1e488fc66f1d926f19f536.tar.gz
make Nim take roughly 100MB less RAM for bootstrapping via a new compiler switch -d:leanCompiler; useful for the Raberry PI
Diffstat (limited to 'compiler/sempass2.nim')
-rw-r--r--compiler/sempass2.nim7
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/sempass2.nim b/compiler/sempass2.nim
index c1bdb08a8..0317fd8ba 100644
--- a/compiler/sempass2.nim
+++ b/compiler/sempass2.nim
@@ -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