comparison dmd/TypeInfoSharedDeclaration.d @ 96:acd69f84627e

further work
author Trass3r
date Tue, 31 Aug 2010 02:12:15 +0200
parents ef02e2e203c2
children e28b18c23469
comparison
equal deleted inserted replaced
95:ae5b11064a9a 96:acd69f84627e
1 module dmd.TypeInfoSharedDeclaration; 1 module dmd.TypeInfoSharedDeclaration;
2 2
3 import dmd.Type; 3 import dmd.Type;
4 import dmd.TypeInfoDeclaration; 4 import dmd.TypeInfoDeclaration;
5 import dmd.backend.dt_t; 5 import dmd.backend.dt_t;
6 import dmd.backend.Util;
7 import dmd.backend.TYM;
6 8
9 version(DMDV2)
7 class TypeInfoSharedDeclaration : TypeInfoDeclaration 10 class TypeInfoSharedDeclaration : TypeInfoDeclaration
8 { 11 {
9 this(Type tinfo) 12 this(Type tinfo)
10 { 13 {
11 super(tinfo, 0); 14 super(tinfo, 0);
12 type = Type.typeinfoshared.type; 15 type = Type.typeinfoshared.type;
13 } 16 }
14 17
15 override void toDt(dt_t** pdt) 18 override void toDt(dt_t** pdt)
16 { 19 {
17 assert(false); 20 // writef("TypeInfoSharedDeclaration::toDt() %s\n", toChars());
21 dtxoff(pdt, Type.typeinfoshared.toVtblSymbol(), 0, TYnptr); // vtbl for TypeInfo_Shared
22 dtdword(pdt, 0); // monitor
23 Type tm = tinfo.unSharedOf();
24 tm = tm.merge();
25 tm.getTypeInfo(null);
26 dtxoff(pdt, tm.vtinfo.toSymbol(), 0, TYnptr);
18 } 27 }
19 } 28 }
20