Mercurial > projects > ddmd
view dmd/TypeInfoInterfaceDeclaration.d @ 175:94b6033c07f3
get rid of globals
malloc -> GC.malloc
author | korDen |
---|---|
date | Sun, 10 Oct 2010 03:48:06 +0400 |
parents | af724d3510d7 |
children | e3afd1303184 |
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) { 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 } }