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