Merge pull request #4015 from arnetheduck/initallocator-fix

fix initAllocator not being called when defined(nogc) and not defined…
This commit is contained in:
Andreas Rumpf
2016-10-13 23:25:05 +02:00
committed by GitHub
2 changed files with 10 additions and 3 deletions

View File

@@ -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})