summary refs log tree commit diff stats
path: root/lib/system/alloc.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2019-08-23 16:15:02 +0200
committerGitHub <noreply@github.com>2019-08-23 16:15:02 +0200
commitb07694cd90ab7c6eb4660971ddb818b461d4eed8 (patch)
treea158993297748d4c55b6e069a6636eefcacd9865 /lib/system/alloc.nim
parentf28a47ea7b9c579b172653c15dc2cc054adf599a (diff)
downloadNim-b07694cd90ab7c6eb4660971ddb818b461d4eed8.tar.gz
new gensym handling (#11985)
* new .gensym implementation
* make astspec test green again
* introduce a --useVersion switch to group compatibility switches
* fixes #10180
* fixes #11494 
* fixes #11483
* object constructor fields and named parameters are also not gensym'ed
* disabled broken package
Diffstat (limited to 'lib/system/alloc.nim')
-rw-r--r--lib/system/alloc.nim12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/system/alloc.nim b/lib/system/alloc.nim
index 9c47d9de9..efbd95089 100644
--- a/lib/system/alloc.nim
+++ b/lib/system/alloc.nim
@@ -984,7 +984,7 @@ when defined(nimTypeNames):
 
 # ---------------------- thread memory region -------------------------------
 
-template instantiateForRegion(allocator: untyped) =
+template instantiateForRegion(allocator: untyped) {.dirty.} =
   {.push stackTrace: off.}
 
   when defined(fulldebug):
@@ -1006,8 +1006,8 @@ template instantiateForRegion(allocator: untyped) =
   proc dealloc(p: pointer) =
     dealloc(allocator, p)
 
-  proc realloc(p: pointer, newsize: Natural): pointer =
-    result = realloc(allocator, p, newsize)
+  proc realloc(p: pointer, newSize: Natural): pointer =
+    result = realloc(allocator, p, newSize)
 
   when false:
     proc countFreeMem(): int =
@@ -1054,13 +1054,13 @@ template instantiateForRegion(allocator: untyped) =
     else:
       dealloc(p)
 
-  proc reallocShared(p: pointer, newsize: Natural): pointer =
+  proc reallocShared(p: pointer, newSize: Natural): pointer =
     when hasThreadSupport:
       acquireSys(heapLock)
-      result = realloc(sharedHeap, p, newsize)
+      result = realloc(sharedHeap, p, newSize)
       releaseSys(heapLock)
     else:
-      result = realloc(p, newsize)
+      result = realloc(p, newSize)
 
   when hasThreadSupport:
     template sharedMemStatsShared(v: int) =