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 {
|
178
|
18 register();
|
114
|
19 super(tinfo, 0);
|
174
|
20 type = global.typeinfofunction.type;
|
73
|
21 }
|
|
22
|
79
|
23 override void toDt(dt_t** pdt)
|
73
|
24 {
|
129
|
25 //printf("TypeInfoFunctionDeclaration.toDt()\n");
|
174
|
26 dtxoff(pdt, global.typeinfofunction.toVtblSymbol(), 0, TYnptr); // vtbl for TypeInfo_Function
|
129
|
27 dtdword(pdt, 0); // monitor
|
|
28
|
|
29 assert(tinfo.ty == Tfunction);
|
|
30
|
|
31 TypeFunction tc = cast(TypeFunction)tinfo;
|
|
32
|
|
33 tc.next.getTypeInfo(null);
|
|
34 dtxoff(pdt, tc.next.vtinfo.toSymbol(), 0, TYnptr); // TypeInfo for function return value
|
73
|
35 }
|
|
36 }
|
|
37
|