0
|
1 module dmd.backend.func_t;
|
|
2
|
114
|
3 import dmd.common;
|
0
|
4 import dmd.backend.LIST;
|
|
5 import dmd.backend.block;
|
|
6 import dmd.backend.symtab_t;
|
|
7 import dmd.backend.Srcpos;
|
|
8 import dmd.backend.Symbol;
|
|
9 import dmd.backend.Classsym;
|
|
10 import dmd.backend.Funcsym;
|
|
11 import dmd.backend.elem;
|
|
12 import dmd.backend.token_t;
|
|
13 import dmd.backend.Thunk;
|
|
14 import dmd.backend.PARAM;
|
|
15
|
|
16 struct func_t
|
|
17 {
|
|
18 symlist_t Fsymtree; // local Symbol table
|
|
19 block* Fstartblock; // list of blocks comprising function
|
|
20 symtab_t Flocsym; // local Symbol table
|
|
21 Srcpos Fstartline; // starting line # of function
|
|
22 Srcpos Fendline; // line # of closing brace of function
|
|
23 Symbol* F__func__; // symbol for __func__[] string
|
|
24 uint Fflags;
|
|
25 uint Fflags3;
|
|
26 ubyte Foper; // operator number (OPxxxx) if Foperator
|
|
27
|
|
28 Symbol* Fparsescope; // use this scope to parse friend functions
|
|
29 // which are defined within a class, so the
|
|
30 // class is in scope, but are not members
|
|
31 // of the class
|
|
32
|
|
33 Classsym* Fclass; // if member of a class, this is the class
|
|
34 // (I think this is redundant with Sscope)
|
|
35 Funcsym* Foversym; // overloaded function at same scope
|
|
36 symlist_t Fclassfriends; /* Symbol list of classes of which this */
|
|
37 /* function is a friend */
|
|
38 block* Fbaseblock; // block where base initializers get attached
|
|
39 block* Fbaseendblock; // block where member destructors get attached
|
|
40 elem* Fbaseinit; /* list of member initializers (meminit_t) */
|
|
41 /* this field has meaning only for */
|
|
42 /* functions which are constructors */
|
|
43 token_t* Fbody; /* if deferred parse, this is the list */
|
|
44 /* of tokens that make up the function */
|
|
45 /* body */
|
|
46 // also used if SCfunctempl, SCftexpspec
|
|
47 uint Fsequence; // sequence number at point of definition
|
|
48 union
|
|
49 {
|
|
50 Symbol* Ftempl; // if Finstance this is the template that generated it
|
|
51 Thunk* Fthunk; // !=NULL if this function is actually a thunk
|
|
52 }
|
|
53
|
|
54 Funcsym* Falias; // SCfuncalias: function Symbol referenced
|
|
55 // by using-declaration
|
|
56
|
|
57 symlist_t Fthunks; // list of thunks off of this function
|
|
58
|
|
59 param_t* Farglist; // SCfunctempl: the template-parameter-list
|
|
60 param_t* Fptal; // Finstance: this is the template-argument-list
|
|
61 // SCftexpspec: for explicit specialization, this
|
|
62 // is the template-argument-list
|
|
63 list_t Ffwdrefinstances; // SCfunctempl: list of forward referenced instances
|
|
64 list_t Fexcspec; // List of types in the exception-specification
|
|
65 // (NULL if none or empty)
|
|
66 Funcsym* Fexplicitspec; // SCfunctempl, SCftexpspec: threaded list
|
|
67 // of SCftexpspec explicit specializations
|
|
68 Funcsym* Fsurrogatesym; // Fsurrogate: surrogate cast function
|
|
69 } |