temporary debugging code for the memory leak investigation
This commit is contained in:
parent
a42545ea3e
commit
c67520a7c5
10 changed files with 125 additions and 25 deletions
|
|
@ -77,6 +77,15 @@ proc getSysType(kind: TTypeKind): PType =
|
|||
var
|
||||
intTypeCache: array[-5..64, PType]
|
||||
|
||||
proc resetSysTypes* =
|
||||
systemModule = nil
|
||||
initStrTable(compilerprocs)
|
||||
for i in low(gSysTypes)..high(gSysTypes):
|
||||
gSysTypes[i] = nil
|
||||
|
||||
for i in low(intTypeCache)..high(intTypeCache):
|
||||
intTypeCache[i] = nil
|
||||
|
||||
proc getIntLitType*(literal: PNode): PType =
|
||||
# we cache some common integer literal types for performance:
|
||||
let value = literal.intVal
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue