Mercurial > projects > ddmd
annotate dmd/TypeInfoInterfaceDeclaration.d @ 174:af724d3510d7
lot os toCBuffer methods implemented
moved shared Type.* stuff into Global
author | korDen |
---|---|
date | Sun, 10 Oct 2010 03:47:23 +0400 |
parents | 206db751bd4c |
children | e3afd1303184 |
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 { | |
21 super(tinfo, 0); | |
174 | 22 type = global.typeinfointerface.type; |
0 | 23 } |
24 | |
72 | 25 override void toDt(dt_t** pdt) |
0 | 26 { |
27 //printf("TypeInfoInterfaceDeclaration.toDt() %s\n", tinfo.toChars()); | |
174 | 28 dtxoff(pdt, global.typeinfointerface.toVtblSymbol(), 0, TYnptr); // vtbl for TypeInfoInterface |
0 | 29 dtdword(pdt, 0); // monitor |
30 | |
31 assert(tinfo.ty == Tclass); | |
32 | |
33 TypeClass tc = cast(TypeClass)tinfo; | |
34 Symbol *s; | |
35 | |
36 if (!tc.sym.vclassinfo) | |
131
206db751bd4c
dmdfe 2.037 compiles now
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
130
diff
changeset
|
37 tc.sym.vclassinfo = new TypeInfoClassDeclaration(tc); |
0 | 38 s = tc.sym.vclassinfo.toSymbol(); |
39 dtxoff(pdt, s, 0, TYnptr); // ClassInfo for tinfo | |
40 } | |
41 } | |
42 |