Mercurial > projects > ddmd
view dmd/TypeInfoInterfaceDeclaration.d @ 182:b64060ab22df
Now compileable with dmd2.050
author | korDen |
---|---|
date | Sat, 30 Oct 2010 05:05:32 +0400 |
parents | e3afd1303184 |
children | b0d41ff5e0df |
line wrap: on
line source
module dmd.TypeInfoInterfaceDeclaration; import dmd.common; import dmd.Type; import dmd.TypeInfoDeclaration; import dmd.ClassInfoDeclaration; import dmd.TypeClass; import dmd.TY; import dmd.Global; import dmd.TypeInfoClassDeclaration; import dmd.backend.dt_t; import dmd.backend.Symbol; import dmd.backend.Util; import dmd.backend.TYM; class TypeInfoInterfaceDeclaration : TypeInfoDeclaration { this(Type tinfo) { register(); super(tinfo, 0); type = global.typeinfointerface.type; } override void toDt(dt_t** pdt) { //printf("TypeInfoInterfaceDeclaration.toDt() %s\n", tinfo.toChars()); dtxoff(pdt, global.typeinfointerface.toVtblSymbol(), 0, TYnptr); // vtbl for TypeInfoInterface dtdword(pdt, 0); // monitor assert(tinfo.ty == Tclass); TypeClass tc = cast(TypeClass)tinfo; Symbol *s; if (!tc.sym.vclassinfo) tc.sym.vclassinfo = new TypeInfoClassDeclaration(tc); s = tc.sym.vclassinfo.toSymbol(); dtxoff(pdt, s, 0, TYnptr); // ClassInfo for tinfo } }