Mercurial > projects > ddmd
annotate dmd/TypeInfoInterfaceDeclaration.d @ 131:206db751bd4c
dmdfe 2.037 compiles now
author | Eldar Insafutdinov <e.insafutdinov@gmail.com> |
---|---|
date | Fri, 10 Sep 2010 00:27:37 +0100 |
parents | 60bb0fe4563e |
children | af724d3510d7 |
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; | |
131
206db751bd4c
dmdfe 2.037 compiles now
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
130
diff
changeset
|
9 import dmd.TypeInfoClassDeclaration; |
72 | 10 |
0 | 11 import dmd.backend.dt_t; |
12 import dmd.backend.Symbol; | |
13 import dmd.backend.Util; | |
72 | 14 import dmd.backend.TYM; |
15 | |
0 | 16 class TypeInfoInterfaceDeclaration : TypeInfoDeclaration |
17 { | |
18 this(Type tinfo) | |
19 { | |
20 super(tinfo, 0); | |
73 | 21 type = Type.typeinfointerface.type; |
0 | 22 } |
23 | |
72 | 24 override void toDt(dt_t** pdt) |
0 | 25 { |
26 //printf("TypeInfoInterfaceDeclaration.toDt() %s\n", tinfo.toChars()); | |
27 dtxoff(pdt, Type.typeinfointerface.toVtblSymbol(), 0, TYnptr); // vtbl for TypeInfoInterface | |
28 dtdword(pdt, 0); // monitor | |
29 | |
30 assert(tinfo.ty == Tclass); | |
31 | |
32 TypeClass tc = cast(TypeClass)tinfo; | |
33 Symbol *s; | |
34 | |
35 if (!tc.sym.vclassinfo) | |
131
206db751bd4c
dmdfe 2.037 compiles now
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
130
diff
changeset
|
36 tc.sym.vclassinfo = new TypeInfoClassDeclaration(tc); |
0 | 37 s = tc.sym.vclassinfo.toSymbol(); |
38 dtxoff(pdt, s, 0, TYnptr); // ClassInfo for tinfo | |
39 } | |
40 } | |
41 |