Mercurial > projects > ddmd
annotate dmd/TypeInfoInterfaceDeclaration.d @ 182:b64060ab22df
Now compileable with dmd2.050
author | korDen |
---|---|
date | Sat, 30 Oct 2010 05:05:32 +0400 |
parents | e3afd1303184 |
children | b0d41ff5e0df |
rev | line source |
---|---|
72 | 1 module dmd.TypeInfoInterfaceDeclaration; |
2 | |
114 | 3 import dmd.common; |
72 | 4 import dmd.Type; |
0 | 5 import dmd.TypeInfoDeclaration; |
6 import dmd.ClassInfoDeclaration; | |
7 import dmd.TypeClass; | |
8 import dmd.TY; | |
174 | 9 import dmd.Global; |
131
206db751bd4c
dmdfe 2.037 compiles now
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
130
diff
changeset
|
10 import dmd.TypeInfoClassDeclaration; |
72 | 11 |
0 | 12 import dmd.backend.dt_t; |
13 import dmd.backend.Symbol; | |
14 import dmd.backend.Util; | |
72 | 15 import dmd.backend.TYM; |
16 | |
0 | 17 class TypeInfoInterfaceDeclaration : TypeInfoDeclaration |
18 { | |
19 this(Type tinfo) | |
20 { | |
178 | 21 register(); |
0 | 22 super(tinfo, 0); |
174 | 23 type = global.typeinfointerface.type; |
0 | 24 } |
25 | |
72 | 26 override void toDt(dt_t** pdt) |
0 | 27 { |
28 //printf("TypeInfoInterfaceDeclaration.toDt() %s\n", tinfo.toChars()); | |
174 | 29 dtxoff(pdt, global.typeinfointerface.toVtblSymbol(), 0, TYnptr); // vtbl for TypeInfoInterface |
0 | 30 dtdword(pdt, 0); // monitor |
31 | |
32 assert(tinfo.ty == Tclass); | |
33 | |
34 TypeClass tc = cast(TypeClass)tinfo; | |
35 Symbol *s; | |
36 | |
37 if (!tc.sym.vclassinfo) | |
131
206db751bd4c
dmdfe 2.037 compiles now
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
130
diff
changeset
|
38 tc.sym.vclassinfo = new TypeInfoClassDeclaration(tc); |
0 | 39 s = tc.sym.vclassinfo.toSymbol(); |
40 dtxoff(pdt, s, 0, TYnptr); // ClassInfo for tinfo | |
41 } | |
42 } | |
43 |