Mercurial > projects > ddmd
annotate dmd/TypeInfoAssociativeArrayDeclaration.d @ 187:b0d41ff5e0df
Added expandability scheme outlined in http://www.dsource.org/forums/viewtopic.php?t=5659&sid=6f2150ff5b0bffcd47512a6a7608d218
author | Abscissa |
---|---|
date | Tue, 07 Jun 2011 23:37:34 -0400 |
parents | e3afd1303184 |
children |
rev | line source |
---|---|
68 | 1 module dmd.TypeInfoAssociativeArrayDeclaration; |
2 | |
114 | 3 import dmd.common; |
68 | 4 import dmd.Type; |
174 | 5 import dmd.Global; |
68 | 6 import dmd.TypeAArray; |
7 import dmd.TY; | |
8 import dmd.TypeInfoDeclaration; | |
9 import dmd.backend.dt_t; | |
10 import dmd.backend.TYM; | |
11 import dmd.backend.Util; | |
12 | |
187
b0d41ff5e0df
Added expandability scheme outlined in http://www.dsource.org/forums/viewtopic.php?t=5659&sid=6f2150ff5b0bffcd47512a6a7608d218
Abscissa
parents:
178
diff
changeset
|
13 import dmd.DDMDExtensions; |
b0d41ff5e0df
Added expandability scheme outlined in http://www.dsource.org/forums/viewtopic.php?t=5659&sid=6f2150ff5b0bffcd47512a6a7608d218
Abscissa
parents:
178
diff
changeset
|
14 |
68 | 15 class TypeInfoAssociativeArrayDeclaration : TypeInfoDeclaration |
16 { | |
187
b0d41ff5e0df
Added expandability scheme outlined in http://www.dsource.org/forums/viewtopic.php?t=5659&sid=6f2150ff5b0bffcd47512a6a7608d218
Abscissa
parents:
178
diff
changeset
|
17 mixin insertMemberExtension!(typeof(this)); |
b0d41ff5e0df
Added expandability scheme outlined in http://www.dsource.org/forums/viewtopic.php?t=5659&sid=6f2150ff5b0bffcd47512a6a7608d218
Abscissa
parents:
178
diff
changeset
|
18 |
68 | 19 this(Type tinfo) |
20 { | |
178 | 21 register(); |
68 | 22 super(tinfo, 0); |
174 | 23 type = global.typeinfoassociativearray.type; |
68 | 24 } |
25 | |
72 | 26 override void toDt(dt_t** pdt) |
68 | 27 { |
28 //printf("TypeInfoAssociativeArrayDeclaration.toDt()\n"); | |
174 | 29 dtxoff(pdt, global.typeinfoassociativearray.toVtblSymbol(), 0, TYnptr); // vtbl for TypeInfo_AssociativeArray |
68 | 30 dtdword(pdt, 0); // monitor |
31 | |
32 assert(tinfo.ty == Taarray); | |
33 | |
34 TypeAArray tc = cast(TypeAArray)tinfo; | |
35 | |
36 tc.next.getTypeInfo(null); | |
37 dtxoff(pdt, tc.next.vtinfo.toSymbol(), 0, TYnptr); // TypeInfo for array of type | |
38 | |
39 tc.index.getTypeInfo(null); | |
40 dtxoff(pdt, tc.index.vtinfo.toSymbol(), 0, TYnptr); // TypeInfo for array of type | |
174 | 41 |
96 | 42 tc.getImpl().type.getTypeInfo(null); |
43 dtxoff(pdt, tc.getImpl().type.vtinfo.toSymbol(), 0, TYnptr); // impl | |
68 | 44 } |
45 } | |
46 |