fixes the recently discovered GC memory leaks

This revision is intended as comparison point between the old and the new GC
The used GC can be switched in mmdisp and various statistics will be gathered during
execution (these will be removed/disabled in later revisions)
This commit is contained in:
Zahary Karadjov 2012-12-05 20:42:19 +02:00
commit 083d4f4708
12 changed files with 1939 additions and 364 deletions

View file

@ -13,11 +13,19 @@ when defined(NimString):
else:
{.pragma: codegenType.}
type # This should be he same as ast.TTypeKind
# many enum fields are not used at runtime
type
# This should be he same as ast.TTypeKind
# many enum fields are not used at runtime
TNimKind = enum
tyNone, tyBool, tyChar,
tyEmpty, tyArrayConstr, tyNil, tyExpr, tyStmt, tyTypeDesc,
tyNone,
tyBool,
tyChar,
tyEmpty,
tyArrayConstr,
tyNil,
tyExpr,
tyStmt,
tyTypeDesc,
tyGenericInvokation, # ``T[a, b]`` for types to invoke
tyGenericBody, # ``T[a, b, body]`` last parameter is the body
tyGenericInst, # ``T[a, b, realInstance]`` instantiated generic type
@ -30,15 +38,30 @@ type # This should be he same as ast.TTypeKind
tyTuple, # WARNING: The compiler uses tyTuple for pure objects!
tySet,
tyRange,
tyPtr, tyRef,
tyPtr,
tyRef,
tyVar,
tySequence,
tyProc,
tyPointer, tyOpenArray,
tyString, tyCString, tyForward,
tyInt, tyInt8, tyInt16, tyInt32, tyInt64,
tyFloat, tyFloat32, tyFloat64, tyFloat128,
tyUInt, tyUInt8, tyUInt16, tyUInt32, tyUInt64,
tyPointer,
tyOpenArray,
tyString,
tyCString,
tyForward,
tyInt,
tyInt8,
tyInt16,
tyInt32,
tyInt64,
tyFloat,
tyFloat32,
tyFloat64,
tyFloat128,
tyUInt,
tyUInt8,
tyUInt16,
tyUInt32,
tyUInt64,
tyBigNum,
TNimNodeKind = enum nkNone, nkSlot, nkList, nkCase