summary refs log tree commit diff stats
path: root/lib/system
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2019-10-19 19:30:48 +0200
committerAndreas Rumpf <rumpf_a@web.de>2019-10-20 08:11:07 +0200
commit0eae2217b69541ea8ce1cf6509732928fb0869ee (patch)
tree36a4b4cfdc732f96eec13bf1d36605e79d0138a1 /lib/system
parented2fb36bc61bd5272734899783ede5e6f285da0e (diff)
downloadNim-0eae2217b69541ea8ce1cf6509732928fb0869ee.tar.gz
first implementation of the new --seqsv2 switch
Diffstat (limited to 'lib/system')
-rw-r--r--lib/system/excpt.nim2
-rw-r--r--lib/system/gc_ms.nim4
-rw-r--r--lib/system/mmdisp.nim2
-rw-r--r--lib/system/repr.nim2
4 files changed, 5 insertions, 5 deletions
diff --git a/lib/system/excpt.nim b/lib/system/excpt.nim
index 1eb4cedc8..e3448ff4c 100644
--- a/lib/system/excpt.nim
+++ b/lib/system/excpt.nim
@@ -439,7 +439,7 @@ proc getStackTrace(e: ref Exception): string =
 proc getStackTraceEntries*(e: ref Exception): seq[StackTraceEntry] =
   ## Returns the attached stack trace to the exception ``e`` as
   ## a ``seq``. This is not yet available for the JS backend.
-  when not defined(gcDestructors):
+  when not defined(nimSeqsV2):
     shallowCopy(result, e.trace)
   else:
     result = move(e.trace)
diff --git a/lib/system/gc_ms.nim b/lib/system/gc_ms.nim
index 3ce428930..271543445 100644
--- a/lib/system/gc_ms.nim
+++ b/lib/system/gc_ms.nim
@@ -254,7 +254,7 @@ proc forAllChildren(cell: PCell, op: WalkOp) =
     of tyRef: # common case
       forAllChildrenAux(cellToUsr(cell), cell.typ.base, op)
     of tySequence:
-      when not defined(gcDestructors):
+      when not defined(nimSeqsV2):
         var d = cast[ByteAddress](cellToUsr(cell))
         var s = cast[PGenericSeq](d)
         if s != nil:
@@ -304,7 +304,7 @@ proc newObjRC1(typ: PNimType, size: int): pointer {.compilerRtl.} =
   zeroMem(result, size)
   when defined(memProfiler): nimProfile(size)
 
-when not defined(gcDestructors):
+when not defined(nimSeqsV2):
   proc newSeq(typ: PNimType, len: int): pointer {.compilerRtl.} =
     # `newObj` already uses locks, so no need for them here.
     let size = addInt(mulInt(len, typ.base.size), GenericSeqSize)
diff --git a/lib/system/mmdisp.nim b/lib/system/mmdisp.nim
index cba88104d..de89acd33 100644
--- a/lib/system/mmdisp.nim
+++ b/lib/system/mmdisp.nim
@@ -518,7 +518,7 @@ else:
   else:
     include "system/gc"
 
-when not declared(nimNewSeqOfCap) and not defined(gcDestructors):
+when not declared(nimNewSeqOfCap) and not defined(nimSeqsV2):
   proc nimNewSeqOfCap(typ: PNimType, cap: int): pointer {.compilerproc.} =
     when defined(gcRegions):
       let s = mulInt(cap, typ.base.size)  # newStr already adds GenericSeqSize
diff --git a/lib/system/repr.nim b/lib/system/repr.nim
index 97975277b..0c7848c75 100644
--- a/lib/system/repr.nim
+++ b/lib/system/repr.nim
@@ -160,7 +160,7 @@ when not defined(useNimRtl):
       reprAux(result, cast[pointer](cast[ByteAddress](p) + i*bs), typ.base, cl)
     add result, "]"
 
-  when defined(gcDestructors):
+  when defined(nimSeqsV2):
     type
       GenericSeq = object
         len: int