Mercurial > projects > ddmd
annotate dmd/TypeInfoSharedDeclaration.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 |
---|---|
72 | 1 module dmd.TypeInfoSharedDeclaration; |
2 | |
114 | 3 import dmd.common; |
72 | 4 import dmd.Type; |
174 | 5 import dmd.Global; |
72 | 6 import dmd.TypeInfoDeclaration; |
7 import dmd.backend.dt_t; | |
96 | 8 import dmd.backend.Util; |
9 import dmd.backend.TYM; | |
72 | 10 |
187
b0d41ff5e0df
Added expandability scheme outlined in http://www.dsource.org/forums/viewtopic.php?t=5659&sid=6f2150ff5b0bffcd47512a6a7608d218
Abscissa
parents:
178
diff
changeset
|
11 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
|
12 |
96 | 13 version(DMDV2) |
0 | 14 class TypeInfoSharedDeclaration : TypeInfoDeclaration |
15 { | |
187
b0d41ff5e0df
Added expandability scheme outlined in http://www.dsource.org/forums/viewtopic.php?t=5659&sid=6f2150ff5b0bffcd47512a6a7608d218
Abscissa
parents:
178
diff
changeset
|
16 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
|
17 |
0 | 18 this(Type tinfo) |
19 { | |
178 | 20 register(); |
0 | 21 super(tinfo, 0); |
174 | 22 type = global.typeinfoshared.type; |
0 | 23 } |
24 | |
72 | 25 override void toDt(dt_t** pdt) |
0 | 26 { |
96 | 27 // writef("TypeInfoSharedDeclaration::toDt() %s\n", toChars()); |
174 | 28 dtxoff(pdt, global.typeinfoshared.toVtblSymbol(), 0, TYnptr); // vtbl for TypeInfo_Shared |
96 | 29 dtdword(pdt, 0); // monitor |
30 Type tm = tinfo.unSharedOf(); | |
31 tm = tm.merge(); | |
32 tm.getTypeInfo(null); | |
33 dtxoff(pdt, tm.vtinfo.toSymbol(), 0, TYnptr); | |
0 | 34 } |
174 | 35 } |