Mercurial > projects > ddmd
diff dmd/Scope.d @ 178:e3afd1303184
Many small bugs fixed
Made all classes derive from TObject to detect memory leaks (functionality is disabled for now)
Began work on overriding backend memory allocations (to avoid memory leaks)
author | korDen |
---|---|
date | Sun, 17 Oct 2010 07:42:00 +0400 |
parents | 96c0fff6897d |
children | b0d41ff5e0df |
line wrap: on
line diff
--- a/dmd/Scope.d Sun Oct 10 10:38:55 2010 +0400 +++ b/dmd/Scope.d Sun Oct 17 07:42:00 2010 +0400 @@ -36,7 +36,9 @@ SCOPEfree = 4, // is on free list } -class Scope +import dmd.TObject; + +class Scope : TObject { Scope enclosing; // enclosing Scope @@ -112,6 +114,7 @@ this() { + register(); // Create root scope //printf("Scope.Scope() %p\n", this); @@ -121,12 +124,14 @@ this(Module module_) { + register(); assert(false); this.docbuf = new OutBuffer; } this(Scope enclosing) { + register(); //printf("Scope.Scope(enclosing = %p) %p\n", enclosing, this); assert(!(enclosing.flags & SCOPE.SCOPEfree)); this.module_ = enclosing.module_;