Mercurial > projects > ddmd
annotate dmd/TypeInfoConstDeclaration.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.TypeInfoConstDeclaration; |
2 | |
114 | 3 import dmd.common; |
72 | 4 import dmd.Type; |
0 | 5 import dmd.TypeInfoDeclaration; |
174 | 6 import dmd.Global; |
0 | 7 import dmd.backend.dt_t; |
8 import dmd.backend.Util; | |
72 | 9 import dmd.backend.TYM; |
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 |
93
df6d0f967680
implemented a whole bunch of methods to make phobos 2.035 compile
Trass3r
parents:
73
diff
changeset
|
13 version(DMDV2) |
0 | 14 class TypeInfoConstDeclaration : 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.typeinfoconst.type; |
0 | 23 } |
24 | |
72 | 25 override void toDt(dt_t** pdt) |
0 | 26 { |
27 //printf("TypeInfoConstDeclaration.toDt() %s\n", toChars()); | |
174 | 28 dtxoff(pdt, global.typeinfoconst.toVtblSymbol(), 0, TYnptr); // vtbl for TypeInfo_Const |
0 | 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 } | |
36 |