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);
|
|
14 }
|
|
15
|
72
|
16 override void toDt(dt_t** pdt)
|
0
|
17 {
|
|
18 //printf("TypeInfoInvariantDeclaration.toDt() %s\n", toChars());
|
|
19 dtxoff(pdt, Type.typeinfoinvariant.toVtblSymbol(), 0, TYnptr); // vtbl for TypeInfo_Invariant
|
|
20 dtdword(pdt, 0); // monitor
|
|
21 Type tm = tinfo.mutableOf();
|
|
22 tm = tm.merge();
|
|
23 tm.getTypeInfo(null);
|
|
24 dtxoff(pdt, tm.vtinfo.toSymbol(), 0, TYnptr);
|
|
25 }
|
|
26 }
|
|
27
|