summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-10-13 23:25:05 +0200
committerGitHub <noreply@github.com>2016-10-13 23:25:05 +0200
commit3ba2d08bbc053dbcfe27d6898befade8c3e200a6 (patch)
tree615bb01fc6645c31271f11c7b153a72f0e598bb2 /lib
parentc3959ea6c3a3a1928c22f12f26412c01f5adecdd (diff)
parent4435d83a885fb3bb7059f1758f20fee14d68a831 (diff)
downloadNim-3ba2d08bbc053dbcfe27d6898befade8c3e200a6.tar.gz
Merge pull request #4015 from arnetheduck/initallocator-fix
fix initAllocator not being called when defined(nogc) and not defined…
Diffstat (limited to 'lib')
-rw-r--r--lib/system.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/system.nim b/lib/system.nim
index 4c8af3d51..fae111ce2 100644
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -2581,10 +2581,11 @@ else:
 when not defined(JS): #and not defined(nimscript):
   {.push stack_trace: off, profiler:off.}
 
-  when not defined(nimscript) and not defined(nogc):
+  when hasAlloc:
     when not defined(gcStack):
       proc initGC()
-    when not defined(boehmgc) and not defined(useMalloc) and not defined(gogc) and not defined(gcStack):
+    when not defined(boehmgc) and not defined(useMalloc) and
+        not defined(gogc) and not defined(gcStack):
       proc initAllocator() {.inline.}
 
     proc initStackBottom() {.inline, compilerproc.} =
@@ -2602,7 +2603,6 @@ when not defined(JS): #and not defined(nimscript):
       when declared(setStackBottom):
         setStackBottom(locals)
 
-  when hasAlloc:
     var
       strDesc = TNimType(size: sizeof(string), kind: tyString, flags: {ntfAcyclic})