Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040 typedef struct parmlist {
00041 TY_IDX ty;
00042 struct parmlist *next;
00043 } PARMS;
00044
00045 #define PARMS_ty(o) ((o)->ty)
00046 #define PARMS_next(o) ((o)->next)
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071 typedef struct alist {
00072 INT32 total_args ;
00073 INT32 fe_given_args ;
00074 INT32 args_seen ;
00075 INT32 arg_lengths_index ;
00076 PARMS * last_parm_ty_seen;
00077 PARMS * last_len_ty_seen;
00078 struct alist * next_entry ;
00079 ST **arglist ;
00080 PARMS *parms;
00081 TY_IDX ret_type;
00082 TY_IDX orig_ret_type;
00083 } DUMMIES ;
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114 typedef struct auxst {
00115 DUMMIES * dummy ;
00116 WN * pragma ;
00117 ST * stptr ;
00118 LIST altentry ;
00119 LIST comlist ;
00120 LIST nlist ;
00121 LIST rlist ;
00122 LIST splitlist;
00123 LIST eqvlist;
00124 LIST dst_comms;
00125 LIST dst_parms;
00126 LIST derived_type_and_mod_var;
00127 char * stem ;
00128 struct auxst * next_auxst;
00129 USRCPOS pos ;
00130 INT32 assign_id;
00131 PREG_det distr_preg;
00132 ST * cri_pointee;
00133 struct data_info_s *data_info;
00134 UINT32 flags ;
00135 } AUXST ;
00136
00137
00138 #define Set_AUXST_Flag(o,f) ((o)->flags |= f)
00139 #define Clear_AUXST_Flag(o,f) ((o)->flags &= ~f)
00140 #define AUXST_Flag(o,f) ((o)->flags & f)
00141
00142 #define AUXST_AssignId(o) ((o)->assign_id)
00143 #define AUXST_CRIPointee(o) ((o)->cri_pointee)
00144 #define AUXST_DataInfo(o) ((o)->data_info)
00145 #define AUXST_Dummies(o) ((o)->dummy)
00146 #define AUXST_DstrReg(o) ((o)->distr_preg.preg)
00147 #define AUXST_DstrTY(o) ((o)->distr_preg.preg_ty)
00148 #define AUXST_DstrST(o) ((o)->distr_preg.preg_st)
00149 #define AUXST_DstrPreg(o) ((o)->distr_preg)
00150 #define AUXST_Flags(o) ((o)->flags)
00151 #define AUXST_Next(o) ((o)->next_auxst)
00152 #define AUXST_OwningST(o) ((o)->stptr)
00153 #define AUXST_Pragma(o) ((o)->pragma)
00154 #define AUXST_SrcPos(o) ((o)->pos)
00155 #define AUXST_Stem(o) ((o)->stem)
00156
00157 #define AUXST_Commons(o) ((LIST *) &(o)->comlist)
00158 #define AUXST_Namelist(o) ((LIST *) &(o)->nlist)
00159 #define AUXST_RtnTemps(o) ((LIST *) &(o)->rlist)
00160 #define AUXST_SplitCommons(o) ((LIST *) &(o)->splitlist)
00161 #define AUXST_Altentries(o) ((LIST *) &(o)->altentry)
00162 #define AUXST_Equivs(o) ((LIST *) &(o)->eqvlist)
00163 #define AUXST_Dstcomlist(o) ((LIST *) &(o)->dst_comms)
00164 #define AUXST_Dstparmlist(o) ((LIST *) &(o)->dst_parms)
00165 #define AUXST_TyMdlist(o) ((LIST *) &(o)->derived_type_and_mod_var)
00166
00167
00168
00169
00170
00171
00172
00173 static AUXST * Top_Auxst[INTERNAL_LEVEL+1] = {NULL,NULL,NULL,NULL};
00174 static AUXST * EP_Current ;
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184 #define MAX_AUXST_LEVEL 8
00185
00186 typedef RELATED_SEGMENTED_ARRAY<AUXST *> AUXST_PTR_ARRAY;
00187
00188 struct AUXST_TAB {
00189 AUXST_PTR_ARRAY *Auxst_table;
00190 };
00191
00192 extern AUXST_TAB *Auxst_tab = NULL;
00193
00194 struct AUXST_TAB_SYMTAB_ACCESS;
00195
00196 typedef TABLE_INDEXED_BY_LEVEL8_AND_INDEX24<AUXST *, ST_IDX, SYMTAB_IDX,
00197 AUXST_TAB *, &Auxst_tab,
00198 AUXST_TAB_SYMTAB_ACCESS>
00199 AUXST_TABLE;
00200
00201 struct AUXST_TAB_SYMTAB_ACCESS {
00202 AUXST_TAB_SYMTAB_ACCESS(void) { }
00203
00204 AUXST_PTR_ARRAY *operator()(AUXST_TAB **Auxst_tab_parm, SYMTAB_IDX level)
00205 {
00206 DevAssert((level < MAX_AUXST_LEVEL), ("AUXST table: leve overflow"));
00207 return (*Auxst_tab_parm)[level].Auxst_table;
00208 }
00209 };
00210
00211 static AUXST_TABLE Auxst_Table;
00212
00213
00214
00215 struct AUX_LABEL_INFO {
00216 INT32 assign_id;
00217 AUX_LABEL_INFO(void) : assign_id(-1) { }
00218 };
00219
00220 typedef RELATED_SEGMENTED_ARRAY<AUX_LABEL_INFO> FE_LABEL_TAB;
00221
00222 FE_LABEL_TAB Auxlabel_Table;
00223
00224
00225
00226
00227 static LIST * cwh_auxst_find_list(AUXST * o, enum list_name list) ;
00228 static AUXST* cwh_auxst_find(ST *st, BOOL create) ;
00229 static DUMMIES * cwh_auxst_find_entry(ST * entry) ;
00230 static void cwh_auxst_dump_dummies(DUMMIES * d);