72
|
1 module dmd.TypeInfoSharedDeclaration;
|
|
2
|
114
|
3 import dmd.common;
|
72
|
4 import dmd.Type;
|
174
|
5 import dmd.Global;
|
72
|
6 import dmd.TypeInfoDeclaration;
|
|
7 import dmd.backend.dt_t;
|
96
|
8 import dmd.backend.Util;
|
|
9 import dmd.backend.TYM;
|
72
|
10
|
96
|
11 version(DMDV2)
|
0
|
12 class TypeInfoSharedDeclaration : TypeInfoDeclaration
|
|
13 {
|
|
14 this(Type tinfo)
|
|
15 {
|
178
|
16 register();
|
0
|
17 super(tinfo, 0);
|
174
|
18 type = global.typeinfoshared.type;
|
0
|
19 }
|
|
20
|
72
|
21 override void toDt(dt_t** pdt)
|
0
|
22 {
|
96
|
23 // writef("TypeInfoSharedDeclaration::toDt() %s\n", toChars());
|
174
|
24 dtxoff(pdt, global.typeinfoshared.toVtblSymbol(), 0, TYnptr); // vtbl for TypeInfo_Shared
|
96
|
25 dtdword(pdt, 0); // monitor
|
|
26 Type tm = tinfo.unSharedOf();
|
|
27 tm = tm.merge();
|
|
28 tm.getTypeInfo(null);
|
|
29 dtxoff(pdt, tm.vtinfo.toSymbol(), 0, TYnptr);
|
0
|
30 }
|
174
|
31 }
|