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
This commit is contained in:
parent
f28a47ea7b
commit
b07694cd90
18 changed files with 346 additions and 114 deletions
|
|
@ -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) =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue