summary refs log tree commit diff stats
path: root/lib/system/cyclebreaker.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/system/cyclebreaker.nim')
-rw-r--r--lib/system/cyclebreaker.nim8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/system/cyclebreaker.nim b/lib/system/cyclebreaker.nim
index a3159f95c..45b0a5a65 100644
--- a/lib/system/cyclebreaker.nim
+++ b/lib/system/cyclebreaker.nim
@@ -53,7 +53,6 @@ depth-first traversal suffices.
 
 ]#
 
-type PT = ptr pointer
 include cellseqs_v2
 
 const
@@ -78,7 +77,7 @@ proc nimMarkCyclic(p: pointer) {.compilerRtl, inl.} = discard
 
 type
   GcEnv = object
-    traceStack: CellSeq
+    traceStack: CellSeq[ptr pointer]
 
 proc trace(p: pointer; desc: PNimTypeV2; j: var GcEnv) {.inline.} =
   when false:
@@ -139,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.} =
@@ -149,7 +149,7 @@ proc thinout*[T](x: ref T) {.inline.} =
   ## and thus would keep the graph from being freed are `nil`'ed.
   ## This is a form of cycle collection that works well with Nim's ARC
   ## and its associated cost model.
-  proc getDynamicTypeInfo[T](x: T): PNimTypeV2 {.magic: "GetTypeInfoV2", noSideEffect, locks: 0.}
+  proc getDynamicTypeInfo[T](x: T): PNimTypeV2 {.magic: "GetTypeInfoV2", noSideEffect.}
 
   breakCycles(head(cast[pointer](x)), getDynamicTypeInfo(x[]))
 
ik/mu/blame/nqueens.mu?h=main&id=08f4628e8b858120fe3547d8e5431d9abfe46bf8'>^
7890b8ce ^
9458918f ^
7890b8ce ^




192d59d3 ^
7890b8ce ^


192d59d3 ^
7890b8ce ^


192d59d3 ^
7890b8ce ^
9458918f ^
7890b8ce ^


9458918f ^
7890b8ce ^
c0d61295 ^

7890b8ce ^






947c639e ^



9458918f ^
7890b8ce ^
4a48bedc ^
40923720 ^
4f1d1944 ^
40923720 ^
7890b8ce ^

9458918f ^
7890b8ce ^
4a48bedc ^
192d59d3 ^
7890b8ce ^


192d59d3 ^
9458918f ^
dd660682 ^
7890b8ce ^


dd660682 ^
7890b8ce ^

9458918f ^
7890b8ce ^
4a48bedc ^
192d59d3 ^

7890b8ce ^


192d59d3 ^



7890b8ce ^

9458918f ^
dd660682 ^
7890b8ce ^


dd660682 ^
7890b8ce ^
760f683f ^




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101