Mercurial > projects > ddmd
annotate dmd/TypeInfoStaticArrayDeclaration.d @ 135:af1bebfd96a4 dmd2037
dmd 2.038
author | Eldar Insafutdinov <e.insafutdinov@gmail.com> |
---|---|
date | Mon, 13 Sep 2010 22:19:42 +0100 |
parents | e28b18c23469 |
children | af724d3510d7 |
rev | line source |
---|---|
64 | 1 module dmd.TypeInfoStaticArrayDeclaration; |
2 | |
114 | 3 import dmd.common; |
64 | 4 import dmd.Type; |
5 import dmd.TypeInfoDeclaration; | |
68
ee3a9f34dc48
final bits of codegen implementation to compile Phobos
korDen
parents:
64
diff
changeset
|
6 import dmd.TypeSArray; |
ee3a9f34dc48
final bits of codegen implementation to compile Phobos
korDen
parents:
64
diff
changeset
|
7 import dmd.TY; |
ee3a9f34dc48
final bits of codegen implementation to compile Phobos
korDen
parents:
64
diff
changeset
|
8 |
ee3a9f34dc48
final bits of codegen implementation to compile Phobos
korDen
parents:
64
diff
changeset
|
9 import dmd.backend.Util; |
ee3a9f34dc48
final bits of codegen implementation to compile Phobos
korDen
parents:
64
diff
changeset
|
10 import dmd.backend.TYM; |
64 | 11 import dmd.backend.dt_t; |
12 | |
13 class TypeInfoStaticArrayDeclaration : TypeInfoDeclaration | |
14 { | |
15 this(Type tinfo) | |
16 { | |
17 super(tinfo, 0); | |
73 | 18 type = Type.typeinfostaticarray.type; |
64 | 19 } |
20 | |
72 | 21 override void toDt(dt_t** pdt) |
64 | 22 { |
68
ee3a9f34dc48
final bits of codegen implementation to compile Phobos
korDen
parents:
64
diff
changeset
|
23 //printf("TypeInfoStaticArrayDeclaration.toDt()\n"); |
ee3a9f34dc48
final bits of codegen implementation to compile Phobos
korDen
parents:
64
diff
changeset
|
24 dtxoff(pdt, Type.typeinfostaticarray.toVtblSymbol(), 0, TYnptr); // vtbl for TypeInfo_StaticArray |
ee3a9f34dc48
final bits of codegen implementation to compile Phobos
korDen
parents:
64
diff
changeset
|
25 dtdword(pdt, 0); // monitor |
ee3a9f34dc48
final bits of codegen implementation to compile Phobos
korDen
parents:
64
diff
changeset
|
26 |
ee3a9f34dc48
final bits of codegen implementation to compile Phobos
korDen
parents:
64
diff
changeset
|
27 assert(tinfo.ty == Tsarray); |
ee3a9f34dc48
final bits of codegen implementation to compile Phobos
korDen
parents:
64
diff
changeset
|
28 |
ee3a9f34dc48
final bits of codegen implementation to compile Phobos
korDen
parents:
64
diff
changeset
|
29 TypeSArray tc = cast(TypeSArray)tinfo; |
ee3a9f34dc48
final bits of codegen implementation to compile Phobos
korDen
parents:
64
diff
changeset
|
30 |
ee3a9f34dc48
final bits of codegen implementation to compile Phobos
korDen
parents:
64
diff
changeset
|
31 tc.next.getTypeInfo(null); |
ee3a9f34dc48
final bits of codegen implementation to compile Phobos
korDen
parents:
64
diff
changeset
|
32 dtxoff(pdt, tc.next.vtinfo.toSymbol(), 0, TYnptr); // TypeInfo for array of type |
ee3a9f34dc48
final bits of codegen implementation to compile Phobos
korDen
parents:
64
diff
changeset
|
33 |
ee3a9f34dc48
final bits of codegen implementation to compile Phobos
korDen
parents:
64
diff
changeset
|
34 dtdword(pdt, cast(int)tc.dim.toInteger()); // length |
64 | 35 } |
72 | 36 } |