Mercurial > projects > ddmd
comparison dmd/TypeNext.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 | 14feb7ae01a6 |
children | b0d41ff5e0df |
comparison
equal
deleted
inserted
replaced
177:1475fd394c9e | 178:e3afd1303184 |
---|---|
14 { | 14 { |
15 Type next; | 15 Type next; |
16 | 16 |
17 this(TY ty, Type next) | 17 this(TY ty, Type next) |
18 { | 18 { |
19 register(); | |
19 super(ty); | 20 super(ty); |
20 this.next = next; | 21 this.next = next; |
21 } | 22 } |
22 version (DumbClone) { | 23 |
23 } else { | |
24 final TypeNext cloneTo(TypeNext t) | |
25 { | |
26 super.cloneTo(t); | |
27 return t; | |
28 } | |
29 | |
30 TypeNext clone() | |
31 { | |
32 assert(this.classinfo == TypeNext.classinfo); | |
33 return cloneTo(new TypeNext(ty, next)); | |
34 } | |
35 } | |
36 override void toDecoBuffer(OutBuffer buf, int flag) | 24 override void toDecoBuffer(OutBuffer buf, int flag) |
37 { | 25 { |
38 super.toDecoBuffer(buf, flag); | 26 super.toDecoBuffer(buf, flag); |
39 assert(next !is this); | 27 assert(next !is this); |
40 //printf("this = %p, ty = %d, next = %p, ty = %d\n", this, this.ty, next, next.ty); | 28 //printf("this = %p, ty = %d, next = %p, ty = %d\n", this, this.ty, next, next.ty); |