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