Mercurial > projects > ddmd
annotate dmd/TypeInfoConstDeclaration.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 | af724d3510d7 |
children | b0d41ff5e0df |
rev | line source |
---|---|
72 | 1 module dmd.TypeInfoConstDeclaration; |
2 | |
114 | 3 import dmd.common; |
72 | 4 import dmd.Type; |
0 | 5 import dmd.TypeInfoDeclaration; |
174 | 6 import dmd.Global; |
0 | 7 import dmd.backend.dt_t; |
8 import dmd.backend.Util; | |
72 | 9 import dmd.backend.TYM; |
10 | |
93
df6d0f967680
implemented a whole bunch of methods to make phobos 2.035 compile
Trass3r
parents:
73
diff
changeset
|
11 version(DMDV2) |
0 | 12 class TypeInfoConstDeclaration : TypeInfoDeclaration |
13 { | |
14 this(Type tinfo) | |
15 { | |
178 | 16 register(); |
0 | 17 super(tinfo, 0); |
174 | 18 type = global.typeinfoconst.type; |
0 | 19 } |
20 | |
72 | 21 override void toDt(dt_t** pdt) |
0 | 22 { |
23 //printf("TypeInfoConstDeclaration.toDt() %s\n", toChars()); | |
174 | 24 dtxoff(pdt, global.typeinfoconst.toVtblSymbol(), 0, TYnptr); // vtbl for TypeInfo_Const |
0 | 25 dtdword(pdt, 0); // monitor |
26 Type tm = tinfo.mutableOf(); | |
27 tm = tm.merge(); | |
28 tm.getTypeInfo(null); | |
29 dtxoff(pdt, tm.vtinfo.toSymbol(), 0, TYnptr); | |
30 } | |
31 } | |
32 |