temporary debugging code for the memory leak investigation

This commit is contained in:
Zahary Karadjov 2012-11-28 01:14:02 +02:00
commit c67520a7c5
10 changed files with 125 additions and 25 deletions

View file

@ -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