Mercurial > projects > ddmd
annotate dmd/TypeInfoStaticArrayDeclaration.d @ 73:ef02e2e203c2
Updating to dmd2.033
author | korDen |
---|---|
date | Sat, 28 Aug 2010 19:42:41 +0400 |
parents | 2e2a5c3f943a |
children | e28b18c23469 |
rev | line source |
---|---|
64 | 1 module dmd.TypeInfoStaticArrayDeclaration; |
2 | |
3 import dmd.Type; | |
4 import dmd.TypeInfoDeclaration; | |
68
ee3a9f34dc48
final bits of codegen implementation to compile Phobos
korDen
parents:
64
diff
changeset
|
5 import dmd.TypeSArray; |
ee3a9f34dc48
final bits of codegen implementation to compile Phobos
korDen
parents:
64
diff
changeset
|
6 import dmd.TY; |
ee3a9f34dc48
final bits of codegen implementation to compile Phobos
korDen
parents:
64
diff
changeset
|
7 |
ee3a9f34dc48
final bits of codegen implementation to compile Phobos
korDen
parents:
64
diff
changeset
|
8 import dmd.backend.Util; |
ee3a9f34dc48
final bits of codegen implementation to compile Phobos
korDen
parents:
64
diff
changeset
|
9 import dmd.backend.TYM; |
64 | 10 import dmd.backend.dt_t; |
11 | |
12 class TypeInfoStaticArrayDeclaration : TypeInfoDeclaration | |
13 { | |
14 this(Type tinfo) | |
15 { | |
16 super(tinfo, 0); | |
73 | 17 type = Type.typeinfostaticarray.type; |
64 | 18 } |
19 | |
72 | 20 override void toDt(dt_t** pdt) |
64 | 21 { |
68
ee3a9f34dc48
final bits of codegen implementation to compile Phobos
korDen
parents:
64
diff
changeset
|
22 //printf("TypeInfoStaticArrayDeclaration.toDt()\n"); |
ee3a9f34dc48
final bits of codegen implementation to compile Phobos
korDen
parents:
64
diff
changeset
|
23 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
|
24 dtdword(pdt, 0); // monitor |
ee3a9f34dc48
final bits of codegen implementation to compile Phobos
korDen
parents:
64
diff
changeset
|
25 |
ee3a9f34dc48
final bits of codegen implementation to compile Phobos
korDen
parents:
64
diff
changeset
|
26 assert(tinfo.ty == Tsarray); |
ee3a9f34dc48
final bits of codegen implementation to compile Phobos
korDen
parents:
64
diff
changeset
|
27 |
ee3a9f34dc48
final bits of codegen implementation to compile Phobos
korDen
parents:
64
diff
changeset
|
28 TypeSArray tc = cast(TypeSArray)tinfo; |
ee3a9f34dc48
final bits of codegen implementation to compile Phobos
korDen
parents:
64
diff
changeset
|
29 |
ee3a9f34dc48
final bits of codegen implementation to compile Phobos
korDen
parents:
64
diff
changeset
|
30 tc.next.getTypeInfo(null); |
ee3a9f34dc48
final bits of codegen implementation to compile Phobos
korDen
parents:
64
diff
changeset
|
31 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
|
32 |
ee3a9f34dc48
final bits of codegen implementation to compile Phobos
korDen
parents:
64
diff
changeset
|
33 dtdword(pdt, cast(int)tc.dim.toInteger()); // length |
64 | 34 } |
72 | 35 } |