Mercurial > projects > ddmd
diff dmd/TypeInfoAssociativeArrayDeclaration.d @ 68:ee3a9f34dc48
final bits of codegen implementation to compile Phobos
author | korDen |
---|---|
date | Tue, 24 Aug 2010 16:44:34 +0400 |
parents | |
children | 2e2a5c3f943a |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dmd/TypeInfoAssociativeArrayDeclaration.d Tue Aug 24 16:44:34 2010 +0400 @@ -0,0 +1,35 @@ +module dmd.TypeInfoAssociativeArrayDeclaration; + +import dmd.Type; +import dmd.TypeAArray; +import dmd.TY; +import dmd.TypeInfoDeclaration; +import dmd.backend.dt_t; +import dmd.backend.TYM; +import dmd.backend.Util; + +class TypeInfoAssociativeArrayDeclaration : TypeInfoDeclaration +{ + this(Type tinfo) + { + super(tinfo, 0); + } + + void toDt(dt_t** pdt) + { + //printf("TypeInfoAssociativeArrayDeclaration.toDt()\n"); + dtxoff(pdt, Type.typeinfoassociativearray.toVtblSymbol(), 0, TYnptr); // vtbl for TypeInfo_AssociativeArray + dtdword(pdt, 0); // monitor + + assert(tinfo.ty == Taarray); + + TypeAArray tc = cast(TypeAArray)tinfo; + + tc.next.getTypeInfo(null); + dtxoff(pdt, tc.next.vtinfo.toSymbol(), 0, TYnptr); // TypeInfo for array of type + + tc.index.getTypeInfo(null); + dtxoff(pdt, tc.index.vtinfo.toSymbol(), 0, TYnptr); // TypeInfo for array of type + } +} +