Mercurial > projects > ddmd
comparison dmd/CastExp.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 |
---|---|
51 Type to; // type to cast to | 51 Type to; // type to cast to |
52 MOD mod; // MODxxxxx | 52 MOD mod; // MODxxxxx |
53 | 53 |
54 this(Loc loc, Expression e, Type t) | 54 this(Loc loc, Expression e, Type t) |
55 { | 55 { |
56 register(); | |
57 | |
56 super(loc, TOK.TOKcast, CastExp.sizeof, e); | 58 super(loc, TOK.TOKcast, CastExp.sizeof, e); |
57 to = t; | 59 to = t; |
58 this.mod = cast(MOD)~0; | 60 this.mod = cast(MOD)~0; |
59 } | 61 } |
60 | 62 |
61 this(Loc loc, Expression e, MOD mod) | 63 this(Loc loc, Expression e, MOD mod) |
62 { | 64 { |
65 register(); | |
66 | |
63 super(loc, TOK.TOKcast, CastExp.sizeof, e); | 67 super(loc, TOK.TOKcast, CastExp.sizeof, e); |
64 to = null; | 68 to = null; |
65 this.mod = mod; | 69 this.mod = mod; |
66 } | 70 } |
67 | 71 |