comparison dmd/TypeInfoSharedDeclaration.d @ 174:af724d3510d7

lot os toCBuffer methods implemented moved shared Type.* stuff into Global
author korDen
date Sun, 10 Oct 2010 03:47:23 +0400
parents e28b18c23469
children e3afd1303184
comparison
equal deleted inserted replaced
173:d237b38b5858 174:af724d3510d7
1 module dmd.TypeInfoSharedDeclaration; 1 module dmd.TypeInfoSharedDeclaration;
2 2
3 import dmd.common; 3 import dmd.common;
4 import dmd.Type; 4 import dmd.Type;
5 import dmd.Global;
5 import dmd.TypeInfoDeclaration; 6 import dmd.TypeInfoDeclaration;
6 import dmd.backend.dt_t; 7 import dmd.backend.dt_t;
7 import dmd.backend.Util; 8 import dmd.backend.Util;
8 import dmd.backend.TYM; 9 import dmd.backend.TYM;
9 10
11 class TypeInfoSharedDeclaration : TypeInfoDeclaration 12 class TypeInfoSharedDeclaration : TypeInfoDeclaration
12 { 13 {
13 this(Type tinfo) 14 this(Type tinfo)
14 { 15 {
15 super(tinfo, 0); 16 super(tinfo, 0);
16 type = Type.typeinfoshared.type; 17 type = global.typeinfoshared.type;
17 } 18 }
18 19
19 override void toDt(dt_t** pdt) 20 override void toDt(dt_t** pdt)
20 { 21 {
21 // writef("TypeInfoSharedDeclaration::toDt() %s\n", toChars()); 22 // writef("TypeInfoSharedDeclaration::toDt() %s\n", toChars());
22 dtxoff(pdt, Type.typeinfoshared.toVtblSymbol(), 0, TYnptr); // vtbl for TypeInfo_Shared 23 dtxoff(pdt, global.typeinfoshared.toVtblSymbol(), 0, TYnptr); // vtbl for TypeInfo_Shared
23 dtdword(pdt, 0); // monitor 24 dtdword(pdt, 0); // monitor
24 Type tm = tinfo.unSharedOf(); 25 Type tm = tinfo.unSharedOf();
25 tm = tm.merge(); 26 tm = tm.merge();
26 tm.getTypeInfo(null); 27 tm.getTypeInfo(null);
27 dtxoff(pdt, tm.vtinfo.toSymbol(), 0, TYnptr); 28 dtxoff(pdt, tm.vtinfo.toSymbol(), 0, TYnptr);