From a772105e7d1662cfc3bf4ce382349d4ea4b72a30 Mon Sep 17 00:00:00 2001 From: Reimer Behrends Date: Thu, 14 Aug 2014 02:10:28 +0200 Subject: [PATCH] Fixed stack bottom initialization for DLLs. --- compiler/cgen.nim | 2 +- lib/system.nim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/cgen.nim b/compiler/cgen.nim index 41f380d1b4..112a2af34d 100644 --- a/compiler/cgen.nim +++ b/compiler/cgen.nim @@ -967,11 +967,11 @@ proc genMainProc(m: BModule) = # functions, which might otherwise merge their stack frames. NimMainBody = "N_CDECL(void, NimMainInner)(void) {$N" & - "\tPreMain();$N" & "$1" & "}$N$N" & "N_CDECL(void, NimMain)(void) {$N" & "\tvoid (*volatile inner)();$N" & + "\tPreMain();$N" & "\tinner = NimMainInner;$N" & "$2" & "\t(*inner)();$N" & diff --git a/lib/system.nim b/lib/system.nim index 8ab3ee2e5d..3bf65c6957 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -2185,7 +2185,7 @@ when not defined(JS): #and not defined(NimrodVM): proc initStackBottomWith(locals: pointer) {.inline, compilerproc.} = # We need to keep initStackBottom around for now to avoid # bootstrapping problems. - when defined(setStackBottom): + when declared(setStackBottom): setStackBottom(locals) var