72
|
1 module dmd.TypeInfoInterfaceDeclaration;
|
|
2
|
|
3 import dmd.Type;
|
0
|
4 import dmd.TypeInfoDeclaration;
|
|
5 import dmd.ClassInfoDeclaration;
|
|
6 import dmd.TypeClass;
|
|
7 import dmd.TY;
|
72
|
8
|
0
|
9 import dmd.backend.dt_t;
|
|
10 import dmd.backend.Symbol;
|
|
11 import dmd.backend.Util;
|
72
|
12 import dmd.backend.TYM;
|
|
13
|
0
|
14 class TypeInfoInterfaceDeclaration : TypeInfoDeclaration
|
|
15 {
|
|
16 this(Type tinfo)
|
|
17 {
|
|
18 super(tinfo, 0);
|
73
|
19 type = Type.typeinfointerface.type;
|
0
|
20 }
|
|
21
|
72
|
22 override void toDt(dt_t** pdt)
|
0
|
23 {
|
|
24 //printf("TypeInfoInterfaceDeclaration.toDt() %s\n", tinfo.toChars());
|
|
25 dtxoff(pdt, Type.typeinfointerface.toVtblSymbol(), 0, TYnptr); // vtbl for TypeInfoInterface
|
|
26 dtdword(pdt, 0); // monitor
|
|
27
|
|
28 assert(tinfo.ty == Tclass);
|
|
29
|
|
30 TypeClass tc = cast(TypeClass)tinfo;
|
|
31 Symbol *s;
|
|
32
|
|
33 if (!tc.sym.vclassinfo)
|
|
34 tc.sym.vclassinfo = new ClassInfoDeclaration(tc.sym);
|
|
35 s = tc.sym.vclassinfo.toSymbol();
|
|
36 dtxoff(pdt, s, 0, TYnptr); // ClassInfo for tinfo
|
|
37 }
|
|
38 }
|
|
39
|