summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2022-11-09 23:22:55 +0800
committerGitHub <noreply@github.com>2022-11-09 16:22:55 +0100
commitf11b7debf75839ae83e3ee3627f6ea5d0a5634a9 (patch)
tree9472525da1b44453ebb7f7380a17fd4c957a9d09 /lib
parent0ead94c4eb8042bc6f8f313dd5ed4f05eb375330 (diff)
downloadNim-f11b7debf75839ae83e3ee3627f6ea5d0a5634a9.tar.gz
remove name field for ARC (#20797)
* remove name field for ARC

* mistake

* improvement

* better

* typo

* fixes a pre-existing bug
Diffstat (limited to 'lib')
-rw-r--r--lib/system.nim3
-rw-r--r--lib/system/cyclebreaker.nim3
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/system.nim b/lib/system.nim
index 3a721080d..a8e5824b5 100644
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -1595,7 +1595,8 @@ when not defined(js) and defined(nimV2):
       align: int16
       depth: int16
       display: ptr UncheckedArray[uint32] # classToken
-      name: cstring
+      when defined(nimTypeNames):
+        name: cstring
       traceImpl: pointer
       typeInfoV1: pointer # for backwards compat, usually nil
       flags: int
diff --git a/lib/system/cyclebreaker.nim b/lib/system/cyclebreaker.nim
index 4427ae53b..45b0a5a65 100644
--- a/lib/system/cyclebreaker.nim
+++ b/lib/system/cyclebreaker.nim
@@ -138,7 +138,8 @@ proc breakCycles(s: Cell; desc: PNimTypeV2) =
       else:
         # anyhow as a link that the produced destructor does not have to follow:
         u[] = nil
-        cprintf("[Bug] %p %s RC %ld\n", t, desc.name, t.rc shr rcShift)
+        when traceCollector:
+          cprintf("[Bug] %p %s RC %ld\n", t, desc.name, t.rc shr rcShift)
   deinit j.traceStack
 
 proc thinout*[T](x: ref T) {.inline.} =