allow old styled RTTI for arc/orc (#15331)
This commit is contained in:
parent
0aaf4e2dfa
commit
fd31e8ff6f
23 changed files with 512 additions and 303 deletions
|
|
@ -10,13 +10,13 @@
|
|||
# Cell seqs for cyclebreaker and cyclicrefs_v2.
|
||||
|
||||
type
|
||||
CellTuple = (PT, PNimType)
|
||||
CellTuple = (PT, PNimTypeV2)
|
||||
CellArray = ptr UncheckedArray[CellTuple]
|
||||
CellSeq = object
|
||||
len, cap: int
|
||||
d: CellArray
|
||||
|
||||
proc add(s: var CellSeq, c: PT; t: PNimType) {.inline.} =
|
||||
proc add(s: var CellSeq, c: PT; t: PNimTypeV2) {.inline.} =
|
||||
if s.len >= s.cap:
|
||||
s.cap = s.cap * 3 div 2
|
||||
when defined(useMalloc):
|
||||
|
|
@ -51,6 +51,6 @@ proc deinit(s: var CellSeq) =
|
|||
s.len = 0
|
||||
s.cap = 0
|
||||
|
||||
proc pop(s: var CellSeq): (PT, PNimType) =
|
||||
proc pop(s: var CellSeq): (PT, PNimTypeV2) =
|
||||
result = s.d[s.len-1]
|
||||
dec s.len
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue