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