summary refs log tree commit diff stats
path: root/lib/system
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2021-03-03 04:37:42 -0800
committerGitHub <noreply@github.com>2021-03-03 13:37:42 +0100
commitf561afae419212e6eeb33f37f834aa7e9d4b9d6f (patch)
tree4855556cbfe11d74af7edf0404c57c65a9fd08f1 /lib/system
parent6391f6e861d4c1dc87a94861374973b809f0d09f (diff)
downloadNim-f561afae419212e6eeb33f37f834aa7e9d4b9d6f.tar.gz
followup #17225: simplify code after removing gc2, generational (#17242)
Diffstat (limited to 'lib/system')
-rw-r--r--lib/system/gc2.nim3
-rw-r--r--lib/system/mmdisp.nim4
-rw-r--r--lib/system/sysstr.nim2
3 files changed, 5 insertions, 4 deletions
diff --git a/lib/system/gc2.nim b/lib/system/gc2.nim
index 09388b6e8..45d467051 100644
--- a/lib/system/gc2.nim
+++ b/lib/system/gc2.nim
@@ -7,6 +7,9 @@
 #    distribution, for details about the copyright.
 #
 
+# xxx deadcode, consider removing unless something could be reused.
+
+
 #            Garbage Collector
 #
 # The basic algorithm is an incremental mark
diff --git a/lib/system/mmdisp.nim b/lib/system/mmdisp.nim
index 8589b678d..96dc86bfd 100644
--- a/lib/system/mmdisp.nim
+++ b/lib/system/mmdisp.nim
@@ -68,9 +68,7 @@ else:
       include "system/cellsets"
     when not leakDetector and not useCellIds and not defined(nimV2):
       sysAssert(sizeof(Cell) == sizeof(FreeCell), "sizeof FreeCell")
-  when compileOption("gc", "v2"):
-    include "system/gc2"
-  elif defined(gcRegions):
+  when defined(gcRegions):
     # XXX due to bootstrapping reasons, we cannot use  compileOption("gc", "stack") here
     include "system/gc_regions"
   elif defined(nimV2) or usesDestructors:
diff --git a/lib/system/sysstr.nim b/lib/system/sysstr.nim
index 06e605a7b..49fff41e9 100644
--- a/lib/system/sysstr.nim
+++ b/lib/system/sysstr.nim
@@ -304,7 +304,7 @@ proc setLengthSeq(seq: PGenericSeq, elemSize, elemAlign, newLen: int): PGenericS
     when not defined(boehmGC) and not defined(nogc) and
          not defined(gcMarkAndSweep) and not defined(gogc) and
          not defined(gcRegions):
-      when false: # compileOption("gc", "v2"):
+      when false: # deadcode: was used by `compileOption("gc", "v2")`
         for i in newLen..result.len-1:
           let len0 = gch.tempStack.len
           forAllChildrenAux(dataPointer(result, elemAlign, elemSize, i),