Mercurial > projects > ddmd
diff dmd/TypeInfoWildDeclaration.d @ 135:af1bebfd96a4 dmd2037
dmd 2.038
author | Eldar Insafutdinov <e.insafutdinov@gmail.com> |
---|---|
date | Mon, 13 Sep 2010 22:19:42 +0100 |
parents | |
children | af724d3510d7 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dmd/TypeInfoWildDeclaration.d Mon Sep 13 22:19:42 2010 +0100 @@ -0,0 +1,29 @@ +module dmd.TypeInfoWildDeclaration; + +import dmd.TY; +import dmd.Type; +import dmd.TypeInfoDeclaration; + +import dmd.backend.dt_t; +import dmd.backend.Util; +import dmd.backend.TYM; + +class TypeInfoWildDeclaration : TypeInfoDeclaration +{ + this(Type tinfo) + { + super(tinfo, 0); + type = Type.typeinfowild.type; + } + + override void toDt(dt_t **pdt) + { + //printf("TypeInfoWildDeclaration::toDt() %s\n", toChars()); + dtxoff(pdt, Type.typeinfowild.toVtblSymbol(), 0, TYnptr); // vtbl for TypeInfo_Wild + dtdword(pdt, 0); // monitor + Type tm = tinfo.mutableOf(); + tm = tm.merge(); + tm.getTypeInfo(null); + dtxoff(pdt, tm.vtinfo.toSymbol(), 0, TYnptr); + } +};