annotate dmd/backend/func_t.d @ 146:af7e5ebef6ad

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