72
|
1 module dmd.TypeInfoDelegateDeclaration;
|
|
2
|
114
|
3 import dmd.common;
|
72
|
4 import dmd.Type;
|
0
|
5 import dmd.TypeInfoDeclaration;
|
|
6 import dmd.TypeDelegate;
|
|
7 import dmd.TY;
|
174
|
8 import dmd.Global;
|
72
|
9
|
0
|
10 import dmd.backend.dt_t;
|
|
11 import dmd.backend.Util;
|
72
|
12 import dmd.backend.TYM;
|
|
13
|
0
|
14 class TypeInfoDelegateDeclaration : TypeInfoDeclaration
|
|
15 {
|
|
16 this(Type tinfo)
|
|
17 {
|
|
18 super(tinfo, 0);
|
174
|
19 type = global.typeinfodelegate.type;
|
0
|
20 }
|
|
21
|
72
|
22 override void toDt(dt_t** pdt)
|
0
|
23 {
|
|
24 //printf("TypeInfoDelegateDeclaration.toDt()\n");
|
174
|
25 dtxoff(pdt, global.typeinfodelegate.toVtblSymbol(), 0, TYnptr); // vtbl for TypeInfo_Delegate
|
0
|
26 dtdword(pdt, 0); // monitor
|
|
27
|
|
28 assert(tinfo.ty == Tdelegate);
|
|
29
|
|
30 TypeDelegate tc = cast(TypeDelegate)tinfo;
|
|
31
|
|
32 tc.next.nextOf().getTypeInfo(null);
|
|
33 dtxoff(pdt, tc.next.nextOf().vtinfo.toSymbol(), 0, TYnptr); // TypeInfo for delegate return value
|
|
34 }
|
|
35 }
|
|
36
|