Mercurial > projects > ddmd
diff dmd/TypeAArray.d @ 68:ee3a9f34dc48
final bits of codegen implementation to compile Phobos
author | korDen |
---|---|
date | Tue, 24 Aug 2010 16:44:34 +0400 |
parents | f708f0452e81 |
children | 2e2a5c3f943a |
line wrap: on
line diff
--- a/dmd/TypeAArray.d Mon Aug 23 21:21:05 2010 +0400 +++ b/dmd/TypeAArray.d Tue Aug 24 16:44:34 2010 +0400 @@ -4,6 +4,7 @@ import dmd.MOD; import dmd.ArrayTypes; import dmd.TypeInfoDeclaration; +import dmd.TypeInfoAssociativeArrayDeclaration; import dmd.Expression; import dmd.Scope; import dmd.Loc; @@ -183,7 +184,15 @@ void toCBuffer2(OutBuffer buf, HdrGenState* hgs, MOD mod) { - assert(false); + if (mod != this.mod) + { + toCBuffer3(buf, hgs, mod); + return; + } + next.toCBuffer2(buf, hgs, this.mod); + buf.writeByte('['); + index.toCBuffer2(buf, hgs, MODundefined); + buf.writeByte(']'); } Expression dotExp(Scope sc, Expression e, Identifier ident) @@ -300,7 +309,7 @@ TypeInfoDeclaration getTypeInfoDeclaration() { - assert(false); + return new TypeInfoAssociativeArrayDeclaration(this); } bool hasPointers()