72
|
1 module dmd.TypeInfoInvariantDeclaration;
|
|
2
|
|
3 import dmd.Type;
|
|
4 import dmd.TypeInfoDeclaration;
|
0
|
5 import dmd.backend.dt_t;
|
|
6 import dmd.backend.Util;
|
72
|
7 import dmd.backend.TYM;
|
|
8
|
0
|
9 class TypeInfoInvariantDeclaration : TypeInfoDeclaration
|
|
10 {
|
|
11 this(Type tinfo)
|
|
12 {
|
|
13 super(tinfo, 0);
|
73
|
14 type = Type.typeinfoinvariant.type;
|
0
|
15 }
|
|
16
|
72
|
17 override void toDt(dt_t** pdt)
|
0
|
18 {
|
|
19 //printf("TypeInfoInvariantDeclaration.toDt() %s\n", toChars());
|
|
20 dtxoff(pdt, Type.typeinfoinvariant.toVtblSymbol(), 0, TYnptr); // vtbl for TypeInfo_Invariant
|
|
21 dtdword(pdt, 0); // monitor
|
|
22 Type tm = tinfo.mutableOf();
|
|
23 tm = tm.merge();
|
|
24 tm.getTypeInfo(null);
|
|
25 dtxoff(pdt, tm.vtinfo.toSymbol(), 0, TYnptr);
|
|
26 }
|
|
27 }
|
|
28
|