From f44e1e2214b2d40f078409aa42418da76a5a6d44 Mon Sep 17 00:00:00 2001 From: Araq Date: Tue, 9 Apr 2019 09:10:47 +0200 Subject: [PATCH] make tests green again --- lib/system/memory.nim | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/system/memory.nim b/lib/system/memory.nim index acfc7dc5e8..13bddf211e 100644 --- a/lib/system/memory.nim +++ b/lib/system/memory.nim @@ -1,3 +1,5 @@ +{.push stack_trace: off.} + const useLibC = not defined(nimNoLibc) when not defined(nimHasHotCodeReloading): @@ -6,7 +8,7 @@ when not defined(nimHasHotCodeReloading): when useLibC: import ansi_c -proc nimCopyMem*(dest, source: pointer, size: Natural) {.compilerproc, inline.} = +proc nimCopyMem*(dest, source: pointer, size: Natural) {.nonReloadable, compilerproc, inline.} = when useLibC: c_memcpy(dest, source, size) else: @@ -31,7 +33,7 @@ proc nimSetMem*(a: pointer, v: cint, size: Natural) {.nonReloadable, inline.} = proc nimZeroMem*(p: pointer, size: Natural) {.compilerproc, nonReloadable, inline.} = nimSetMem(p, 0, size) -proc nimCmpMem*(a, b: pointer, size: Natural): cint {.compilerproc, inline.} = +proc nimCmpMem*(a, b: pointer, size: Natural): cint {.compilerproc, nonReloadable, inline.} = when useLibC: c_memcmp(a, b, size) else: @@ -51,3 +53,5 @@ proc nimCStrLen*(a: cstring): csize {.compilerproc, nonReloadable, inline.} = while a[] != 0: a = cast[ptr byte](cast[uint](a) + 1) inc result + +{.pop.}