Mercurial > projects > ddmd
annotate dmd/TypeInfoPointerDeclaration.d @ 192:eb38fdcb3e62 default tip
updated to compile with dmd2.062
author | korDen |
---|---|
date | Sat, 02 Mar 2013 01:25:52 -0800 |
parents | b0d41ff5e0df |
children |
rev | line source |
---|---|
72 | 1 module dmd.TypeInfoPointerDeclaration; |
2 | |
114 | 3 import dmd.common; |
72 | 4 import dmd.Type; |
0 | 5 import dmd.TypeInfoDeclaration; |
6 import dmd.TypePointer; | |
72 | 7 import dmd.TY; |
174 | 8 import dmd.Global; |
0 | 9 import dmd.backend.dt_t; |
10 import dmd.backend.Util; | |
72 | 11 import dmd.backend.TYM; |
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 |
0 | 15 class TypeInfoPointerDeclaration : 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 |
0 | 19 this(Type tinfo) |
20 { | |
178 | 21 register(); |
0 | 22 super(tinfo, 0); |
174 | 23 type = global.typeinfopointer.type; |
0 | 24 } |
25 | |
72 | 26 override void toDt(dt_t** pdt) |
0 | 27 { |
28 //printf("TypeInfoPointerDeclaration::toDt()\n"); | |
174 | 29 dtxoff(pdt, global.typeinfopointer.toVtblSymbol(), 0, TYnptr); // vtbl for TypeInfo_Pointer |
0 | 30 dtdword(pdt, 0); // monitor |
31 | |
32 assert(tinfo.ty == Tpointer); | |
33 | |
34 TypePointer tc = cast(TypePointer)tinfo; | |
35 | |
36 tc.next.getTypeInfo(null); | |
37 dtxoff(pdt, tc.next.vtinfo.toSymbol(), 0, TYnptr); // TypeInfo for type being pointed to | |
38 } | |
39 } | |
40 |