Mercurial > projects > ddmd
comparison dmd/TypePointer.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 | af1bebfd96a4 |
children | b0d41ff5e0df |
comparison
equal
deleted
inserted
replaced
177:1475fd394c9e | 178:e3afd1303184 |
---|---|
24 | 24 |
25 class TypePointer : TypeNext | 25 class TypePointer : TypeNext |
26 { | 26 { |
27 this(Type t) | 27 this(Type t) |
28 { | 28 { |
29 register(); | |
29 super(TY.Tpointer, t); | 30 super(TY.Tpointer, t); |
30 } | 31 } |
31 version (DumbClone) { | |
32 } else { | |
33 final TypePointer cloneTo(TypePointer t) | |
34 { | |
35 super.cloneTo(t); | |
36 return t; | |
37 } | |
38 | 32 |
39 TypePointer clone() | |
40 { | |
41 assert(this.classinfo == TypePointer.classinfo); | |
42 return cloneTo(new TypePointer(next)); | |
43 } | |
44 } | |
45 override Type syntaxCopy() | 33 override Type syntaxCopy() |
46 { | 34 { |
47 Type t = next.syntaxCopy(); | 35 Type t = next.syntaxCopy(); |
48 if (t == next) | 36 if (t == next) |
49 t = this; | 37 t = this; |