Open64 (mfef90, whirl2f, and IR tools)
TAG: version-openad; SVN changeset: 916
|
00001 /* 00002 00003 Copyright (C) 2000, 2001 Silicon Graphics, Inc. All Rights Reserved. 00004 00005 This program is free software; you can redistribute it and/or modify it 00006 under the terms of version 2 of the GNU General Public License as 00007 published by the Free Software Foundation. 00008 00009 This program is distributed in the hope that it would be useful, but 00010 WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00012 00013 Further, this software is distributed without any warranty that it is 00014 free of the rightful claim of any third person regarding infringement 00015 or the like. Any license provided herein, whether implied or 00016 otherwise, applies only to this software file. Patent licenses, if 00017 any, provided herein do not apply to combinations of this program with 00018 other software, or any other product whatsoever. 00019 00020 You should have received a copy of the GNU General Public License along 00021 with this program; if not, write the Free Software Foundation, Inc., 59 00022 Temple Place - Suite 330, Boston MA 02111-1307, USA. 00023 00024 Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pky, 00025 Mountain View, CA 94043, or: 00026 00027 http://www.sgi.com 00028 00029 For further information regarding this notice, see: 00030 00031 http://oss.sgi.com/projects/GenInfo/NoticeExplan 00032 00033 */ 00034 00035 00036 /* -*-Mode: c++;-*- (Tell emacs to use c++ mode) */ 00037 00038 // access functions for various symbol tables 00039 00040 // this file contains functions for direct read/write to individual field 00041 // of each symbol table data structure. Access functions that do not 00042 // directly return the value of a field in a struct should be placed in 00043 // symtab.h or symtab_util.h. 00044 00045 // TODO: This file should really be generated automatically from 00046 // symtab_defs.h 00047 00048 #ifndef symtab_access_INCLUDED 00049 #define symtab_access_INCLUDED 00050 00051 //---------------------------------------------------------------------- 00052 // unique handles for each structure 00053 //---------------------------------------------------------------------- 00054 00055 class FLD_HANDLE 00056 { 00057 private: 00058 FLD* entry; 00059 FLD_IDX idx; 00060 00061 public: 00062 FLD_HANDLE () : entry (NULL), idx (0) {} 00063 00064 explicit FLD_HANDLE (FLD_IDX fld_idx) : 00065 entry (fld_idx == 0 ? NULL : &Fld_Table[fld_idx]), idx (fld_idx) {} 00066 00067 FLD_HANDLE (FLD* fld, FLD_IDX fld_idx) : entry (fld), idx (fld_idx) { 00068 Is_True ((fld_idx == 0 && fld == NULL) || (&Fld_Table[fld_idx] == fld), 00069 ("Inconsistent FLD* and FLD_IDX")); 00070 } 00071 00072 FLD_HANDLE (const FLD_HANDLE& fld) : entry (fld.entry), idx (fld.idx) {} 00073 00074 FLD_HANDLE (const FLD_ITER& iter) : entry (&(*iter)), idx (iter.Index()) {} 00075 00076 FLD* Entry () const { return entry; } 00077 FLD_IDX Idx () const { return idx; } 00078 00079 BOOL operator== (const FLD_HANDLE& fld) const { 00080 return idx == fld.idx; 00081 } 00082 00083 BOOL operator!= (const FLD_HANDLE& fld) const { 00084 return idx != fld.idx; 00085 } 00086 00087 00088 BOOL Is_Null () const { return idx == 0; } 00089 }; 00090 00091 class ARB_HANDLE 00092 { 00093 private: 00094 ARB* entry; 00095 ARB_IDX idx; 00096 00097 public: 00098 ARB_HANDLE () : entry (NULL), idx (0) {} 00099 00100 explicit ARB_HANDLE (ARB_IDX arb_idx) : 00101 entry (arb_idx == 0 ? NULL : &Arb_Table[arb_idx]), idx (arb_idx) {} 00102 00103 ARB_HANDLE (ARB* arb, ARB_IDX arb_idx) : entry (arb), idx (arb_idx) { 00104 Is_True ((arb_idx == 0 && arb == NULL) || (&Arb_Table[arb_idx] == arb), 00105 ("Inconsistent ARB* and ARB_IDX")); 00106 } 00107 00108 ARB_HANDLE (const ARB_HANDLE& arb) : entry (arb.entry), idx (arb.idx) {} 00109 00110 ARB_HANDLE (const ARB_ITER& iter) : entry (&(*iter)), idx (iter.Index()) {} 00111 00112 ARB* Entry () const { return entry; } 00113 ARB_IDX Idx () const { return idx; } 00114 00115 BOOL operator== (const ARB_HANDLE& arb) const { 00116 return idx == arb.idx; 00117 } 00118 00119 ARB_HANDLE operator[] (INT32 i) { 00120 return ARB_HANDLE(idx + i); 00121 } 00122 00123 BOOL Is_Null () const { return idx == 0; } 00124 }; 00125 //---------------------------------------------------------------------- 00126 // access functions for ST 00127 //---------------------------------------------------------------------- 00128 00129 inline STR_IDX 00130 ST_name_idx (const ST& s) { return s.u1.name_idx; } 00131 inline void 00132 Set_ST_name_idx (ST& s, STR_IDX idx) { s.u1.name_idx = idx; } 00133 inline char * 00134 ST_name (const ST& s) { return &Str_Table[ST_name_idx (s)]; } 00135 00136 inline TCON_IDX 00137 ST_tcon (const ST& s) { return s.u1.tcon; } 00138 inline void 00139 Set_ST_tcon (ST& s, TCON_IDX tcon) { s.u1.tcon = tcon; } 00140 00141 inline ST_CLASS 00142 ST_sym_class (const ST& s) { return s.sym_class; } 00143 inline void 00144 Set_ST_sym_class (ST& s, ST_CLASS c) { s.sym_class = c; } 00145 00146 inline ST_SCLASS 00147 ST_storage_class (const ST& s) { return s.storage_class; } 00148 inline void 00149 Set_ST_storage_class (ST& s, ST_SCLASS sc) { s.storage_class = sc; } 00150 00151 inline ST_SCLASS 00152 ST_sclass (const ST& s) { return s.storage_class; } 00153 inline void 00154 Set_ST_sclass (ST& s, ST_SCLASS sc) { s.storage_class = sc; } 00155 00156 inline ST_EXPORT 00157 ST_export (const ST& s) { return s.export_class; } 00158 inline void 00159 Set_ST_export (ST& s, ST_EXPORT eclass) { s.export_class = eclass; } 00160 00161 inline TY_IDX 00162 ST_type (const ST& s) { 00163 #ifdef Is_True_On 00164 switch (s.sym_class) { 00165 default: 00166 Fail_FmtAssertion ("Invalid argument for ST_type ()"); 00167 case CLASS_VAR: 00168 case CLASS_CONST: 00169 case CLASS_PREG: 00170 case CLASS_NAME: 00171 case CLASS_TYPE: 00172 case CLASS_PARAMETER: 00173 return s.u2.type; 00174 } 00175 #else 00176 return s.u2.type; 00177 #endif // Is_True_On 00178 } 00179 inline void 00180 Set_ST_type (ST& s, TY_IDX t) { 00181 #ifdef Is_True_On 00182 switch (s.sym_class) { 00183 default: 00184 Fail_FmtAssertion ("Invalid argument for Set_ST_type ()"); 00185 case CLASS_VAR: 00186 case CLASS_CONST: 00187 case CLASS_PREG: 00188 case CLASS_NAME: 00189 case CLASS_TYPE: 00190 case CLASS_PARAMETER: 00191 s.u2.type = t; 00192 } 00193 #else 00194 s.u2.type = t; 00195 #endif // Is_True_On 00196 } 00197 00198 inline PU_IDX 00199 ST_pu (const ST& s) { 00200 Is_True (s.sym_class == CLASS_FUNC || 00201 (s.sym_class == CLASS_NAME && 00202 (s.flags & ST_ASM_FUNCTION_ST)), 00203 ("Invalid argument for ST_pu")); 00204 return s.u2.pu; 00205 } 00206 inline void 00207 Set_ST_pu (ST& s, PU_IDX pu) 00208 { 00209 Is_True (s.sym_class == CLASS_FUNC || 00210 (s.sym_class == CLASS_NAME && 00211 s.flags & ST_ASM_FUNCTION_ST), 00212 ("Invalid argument for ST_pu")); 00213 s.u2.pu = pu; 00214 } 00215 00216 inline BLK_IDX 00217 ST_blk (const ST& s) { 00218 Is_True (s.sym_class == CLASS_BLOCK, ("Invalid argument for ST_blk")); 00219 return s.u2.blk; 00220 } 00221 inline void 00222 Set_ST_blk (ST& s, BLK_IDX b) 00223 { 00224 Is_True (s.sym_class == CLASS_BLOCK, ("Invalid argument for ST_blk")); 00225 s.u2.blk = b; 00226 } 00227 00228 inline ST_IDX 00229 ST_st_idx (const ST& s) { return s.st_idx; } 00230 inline void 00231 Set_ST_st_idx (ST& s, ST_IDX idx) { s.st_idx = idx; } 00232 00233 inline ST* 00234 ST_ptr (ST_IDX idx) { return &(St_Table[idx]); } 00235 00236 inline UINT64 00237 ST_ofst (const ST& s) { return s.offset; } 00238 inline void 00239 Set_ST_ofst (ST& s, UINT64 offset) { s.offset = offset; } 00240 00241 //---------------------------------------------------------------------- 00242 // ST flags 00243 //---------------------------------------------------------------------- 00244 00245 inline BOOL 00246 ST_is_weak_symbol (const ST& s) { return s.flags & ST_IS_WEAK_SYMBOL;} 00247 inline void 00248 Set_ST_is_weak_symbol (ST& s) { s.flags |= ST_IS_WEAK_SYMBOL; } 00249 inline void 00250 Clear_ST_is_weak_symbol (ST& s) { s.flags &= ~ST_IS_WEAK_SYMBOL; } 00251 00252 inline BOOL 00253 ST_is_split_common (const ST& s) { return s.flags & ST_IS_SPLIT_COMMON;} 00254 00255 inline void 00256 Set_ST_is_split_common (ST& s) { s.flags |= ST_IS_SPLIT_COMMON; } 00257 00258 inline void 00259 Clear_ST_is_split_common (ST& s) { s.flags &= ~ST_IS_SPLIT_COMMON; } 00260 00261 inline ST_IDX 00262 ST_base_idx (const ST& s) 00263 { 00264 if (ST_is_split_common (s)) 00265 return s.st_idx; 00266 else if (ST_is_weak_symbol (s) && ST_sclass(s) == SCLASS_EXTERN) 00267 return s.st_idx; 00268 else 00269 return s.base_idx; 00270 } 00271 inline void 00272 Set_ST_base_idx (ST& s, ST_IDX base) 00273 { 00274 if (ST_is_split_common (s)) 00275 DevWarn ("Shouldn't set base when split"); 00276 else if (ST_is_weak_symbol (s) && ST_sclass(s) == SCLASS_EXTERN) 00277 DevWarn ("Shouldn't set base when weak"); 00278 s.base_idx = base; 00279 } 00280 00281 inline ST_IDX 00282 ST_strong_idx (const ST& s) 00283 { 00284 Is_True (ST_is_weak_symbol (s), ("Expecting a weak symbol")); 00285 return (ST_sclass (s) == SCLASS_EXTERN) ? s.base_idx : s.st_idx; 00286 } 00287 inline void 00288 Set_ST_strong_idx (ST& s, ST_IDX base) 00289 { 00290 Is_True (ST_is_weak_symbol (s) && ST_sclass(s) == SCLASS_EXTERN, 00291 ("Expecting an external weak symbol")); 00292 s.base_idx = base; 00293 } 00294 00295 inline ST_IDX 00296 ST_full_idx (const ST& s) 00297 { 00298 Is_True (ST_is_split_common (s), ("Expecting a splict common")); 00299 return s.base_idx; 00300 } 00301 inline void 00302 Set_ST_full_idx (ST& s, ST_IDX base) 00303 { 00304 Is_True (ST_is_split_common (s), ("Expecting a splict common")); 00305 s.base_idx = base; 00306 } 00307 00308 inline BOOL 00309 ST_is_not_used (const ST& s) { return s.flags & ST_IS_NOT_USED;} 00310 inline void 00311 Set_ST_is_not_used (ST& s) { s.flags |= ST_IS_NOT_USED; } 00312 inline void 00313 Clear_ST_is_not_used (ST& s) { s.flags &= ~ST_IS_NOT_USED; } 00314 00315 inline BOOL 00316 ST_is_initialized (const ST& s) { return s.flags & ST_IS_INITIALIZED;} 00317 inline void 00318 Set_ST_is_initialized (ST& s) { s.flags |= ST_IS_INITIALIZED; } 00319 inline void 00320 Clear_ST_is_initialized (ST& s) { s.flags &= ~ST_IS_INITIALIZED; } 00321 00322 inline BOOL 00323 ST_is_return_var (const ST& s) { return s.flags & ST_IS_RETURN_VAR;} 00324 inline void 00325 Set_ST_is_return_var (ST& s) { s.flags |= ST_IS_RETURN_VAR; } 00326 inline void 00327 Clear_ST_is_return_var (ST& s) { s.flags &= ~ST_IS_RETURN_VAR; } 00328 00329 inline BOOL 00330 ST_is_private (const ST& s) { return s.flags & ST_IS_PRIVATE;} 00331 inline void 00332 Set_ST_is_private (ST& s) { s.flags |= ST_IS_PRIVATE; } 00333 inline void 00334 Clear_ST_is_private (ST& s) { s.flags &= ~ST_IS_PRIVATE; } 00335 00336 00337 inline BOOL 00338 ST_is_value_parm (const ST& s) { return s.flags & ST_IS_VALUE_PARM;} 00339 inline void 00340 Set_ST_is_value_parm (ST& s) { s.flags |= ST_IS_VALUE_PARM; } 00341 inline void 00342 Clear_ST_is_value_parm (ST& s) { s.flags &= ~ST_IS_VALUE_PARM; } 00343 00344 inline BOOL 00345 ST_promote_parm (const ST& s) { return s.flags & ST_PROMOTE_PARM;} 00346 inline void 00347 Set_ST_promote_parm (ST& s) { s.flags |= ST_PROMOTE_PARM; } 00348 inline void 00349 Clear_ST_promote_parm (ST& s) { s.flags &= ~ST_PROMOTE_PARM; } 00350 00351 inline BOOL 00352 ST_keep_name_w2f (const ST& s) { return s.flags & ST_KEEP_NAME_W2F;} 00353 inline void 00354 Set_ST_keep_name_w2f (ST& s) { s.flags |= ST_KEEP_NAME_W2F; } 00355 inline void 00356 Clear_ST_keep_name_w2f (ST& s) { s.flags &= ~ST_KEEP_NAME_W2F; } 00357 00358 inline BOOL 00359 ST_is_datapool (const ST& s) { return s.flags & ST_IS_DATAPOOL;} 00360 inline void 00361 Set_ST_is_datapool (ST& s) { s.flags |= ST_IS_DATAPOOL; } 00362 inline void 00363 Clear_ST_is_datapool (ST& s) { s.flags &= ~ST_IS_DATAPOOL; } 00364 00365 inline BOOL 00366 ST_is_reshaped (const ST& s) { return s.flags & ST_IS_RESHAPED;} 00367 inline void 00368 Set_ST_is_reshaped (ST& s) { s.flags |= ST_IS_RESHAPED; } 00369 inline void 00370 Clear_ST_is_reshaped (ST& s) { s.flags &= ~ST_IS_RESHAPED; } 00371 00372 inline BOOL 00373 ST_is_deleted (const ST& s) { return s.flags_ext & ST_IS_DELETED; } 00374 inline void 00375 Set_ST_is_deleted (ST& s) { s.flags_ext |= ST_IS_DELETED; } 00376 inline void 00377 Clear_ST_is_deleted (ST& s) { s.flags_ext &= ~ST_IS_DELETED; } 00378 00379 inline BOOL 00380 ST_emit_symbol (const ST& s) { return s.flags & ST_EMIT_SYMBOL;} 00381 inline void 00382 Set_ST_emit_symbol (ST& s) { s.flags |= ST_EMIT_SYMBOL; } 00383 inline void 00384 Clear_ST_emit_symbol (ST& s) { s.flags &= ~ST_EMIT_SYMBOL; } 00385 00386 inline BOOL 00387 ST_has_nested_ref (const ST& s) { return s.flags & ST_HAS_NESTED_REF;} 00388 inline void 00389 Set_ST_has_nested_ref (ST& s) { s.flags |= ST_HAS_NESTED_REF; } 00390 inline void 00391 Clear_ST_has_nested_ref (ST& s) { s.flags &= ~ST_HAS_NESTED_REF; } 00392 00393 inline BOOL 00394 ST_init_value_zero (const ST& s) { return s.flags & ST_INIT_VALUE_ZERO;} 00395 inline void 00396 Set_ST_init_value_zero (ST& s) { s.flags |= ST_INIT_VALUE_ZERO; } 00397 inline void 00398 Clear_ST_init_value_zero (ST& s) { s.flags &= ~ST_INIT_VALUE_ZERO; } 00399 00400 inline BOOL 00401 ST_gprel (const ST& s) { return s.flags & ST_GPREL;} 00402 inline void 00403 Set_ST_gprel (ST& s) { s.flags |= ST_GPREL; } 00404 inline void 00405 Clear_ST_gprel (ST& s) { s.flags &= ~ST_GPREL; } 00406 00407 inline BOOL 00408 ST_not_gprel (const ST& s) { return s.flags & ST_NOT_GPREL;} 00409 inline void 00410 Set_ST_not_gprel (ST& s) { s.flags |= ST_NOT_GPREL; } 00411 inline void 00412 Clear_ST_not_gprel (ST& s) { s.flags &= ~ST_NOT_GPREL; } 00413 00414 inline BOOL 00415 ST_is_namelist (const ST& s) { return s.flags & ST_IS_NAMELIST;} 00416 inline void 00417 Set_ST_is_namelist (ST& s) { s.flags |= ST_IS_NAMELIST; } 00418 inline void 00419 Clear_ST_is_namelist (ST& s) { s.flags &= ~ST_IS_NAMELIST; } 00420 00421 inline BOOL 00422 ST_is_f90_target (const ST& s) { return s.flags & ST_IS_F90_TARGET;} 00423 inline void 00424 Set_ST_is_f90_target (ST& s) { s.flags |= ST_IS_F90_TARGET; } 00425 inline void 00426 Clear_ST_is_f90_target (ST& s) { s.flags &= ~ST_IS_F90_TARGET; } 00427 00428 inline BOOL 00429 ST_is_my_pointer (const ST& s) { return s.flags_ext & ST_IS_POINTER;} 00430 inline void 00431 Set_ST_is_my_pointer (ST& s) { s.flags_ext |= ST_IS_POINTER; } 00432 inline void 00433 Clear_ST_is_my_pointer (ST& s) { s.flags_ext &= ~ST_IS_POINTER; } 00434 00435 00436 inline BOOL 00437 ST_is_allocatable (const ST& s) { return s.flags_ext & ST_IS_ALLOCATABLE;} 00438 inline void 00439 Set_ST_is_allocatable (ST& s) { s.flags_ext |= ST_IS_ALLOCATABLE; } 00440 inline void 00441 Clear_ST_is_allocatable (ST& s) { s.flags_ext &= ~ST_IS_ALLOCATABLE; } 00442 00443 inline BOOL 00444 ST_is_in_module (const ST& s) { return s.flags_ext & ST_IS_IN_MODULE;} 00445 inline void 00446 Set_ST_is_in_module (ST& s) { s.flags_ext |= ST_IS_IN_MODULE; } 00447 inline void 00448 Clear_ST_is_in_module (ST& s) { s.flags_ext &= ~ST_IS_IN_MODULE; } 00449 00450 inline BOOL 00451 ST_is_block_data (const ST& s) { return s.flags_ext & ST_IS_BLOCK_DATA;} 00452 inline void 00453 Set_ST_is_block_data (ST& s) { s.flags_ext |= ST_IS_BLOCK_DATA; } 00454 inline void 00455 Clear_ST_is_block_data (ST& s) { s.flags_ext &= ~ST_IS_BLOCK_DATA; } 00456 00457 inline BOOL 00458 ST_is_external (const ST& s) { return s.flags_ext & ST_IS_EXTERNAL;} 00459 inline void 00460 Set_ST_is_external (ST& s) { s.flags_ext |= ST_IS_EXTERNAL; } 00461 inline void 00462 Clear_ST_is_external (ST& s) { s.flags_ext &= ~ST_IS_EXTERNAL; } 00463 00464 inline BOOL 00465 ST_is_coarray_concurrent (const ST& s) { return s.flags_ext & ST_IS_COARRAY_CONCURRENT;} 00466 inline void 00467 Set_ST_is_coarray_concurrent (ST& s) { s.flags_ext |= ST_IS_COARRAY_CONCURRENT; } 00468 inline void 00469 Clear_ST_is_coarray_concurrent (ST& s) { s.flags_ext &= ~ST_IS_COARRAY_CONCURRENT; } 00470 00471 00472 inline BOOL 00473 ST_is_M_imported (const ST& s) { return s.flags_ext & ST_IS_M_IMPORTED;} 00474 inline void 00475 Set_ST_is_M_imported (ST& s) { s.flags_ext |= ST_IS_M_IMPORTED; } 00476 inline void 00477 Clear_ST_is_M_imported (ST& s) { s.flags_ext &= ~ST_IS_M_IMPORTED; } 00478 00479 inline BOOL 00480 ST_declared_static (const ST& s) { return s.flags & ST_DECLARED_STATIC;} 00481 inline void 00482 Set_ST_declared_static (ST& s) { s.flags |= ST_DECLARED_STATIC; } 00483 inline void 00484 Clear_ST_declared_static (ST& s) { s.flags &= ~ST_DECLARED_STATIC; } 00485 00486 inline BOOL 00487 ST_is_equivalenced (const ST& s) { return s.flags & ST_IS_EQUIVALENCED;} 00488 inline void 00489 Set_ST_is_equivalenced (ST& s) { s.flags |= ST_IS_EQUIVALENCED; } 00490 inline void 00491 Clear_ST_is_equivalenced (ST& s) { s.flags &= ~ST_IS_EQUIVALENCED; } 00492 00493 inline BOOL 00494 ST_is_fill_align (const ST& s) { return s.flags & ST_IS_FILL_ALIGN;} 00495 inline void 00496 Set_ST_is_fill_align (ST& s) { s.flags |= ST_IS_FILL_ALIGN; } 00497 inline void 00498 Clear_ST_is_fill_align (ST& s) { s.flags &= ~ST_IS_FILL_ALIGN; } 00499 00500 inline BOOL 00501 ST_is_optional_argument (const ST& s) { return s.flags & ST_IS_OPTIONAL_ARGUMENT;} 00502 inline void 00503 Set_ST_is_optional_argument (ST& s) { s.flags |= ST_IS_OPTIONAL_ARGUMENT; } 00504 inline void 00505 Clear_ST_is_optional_argument (ST& s) { s.flags &= ~ST_IS_OPTIONAL_ARGUMENT; } 00506 00507 inline BOOL 00508 ST_is_intent_in_argument (const ST& s) { return s.flags_ext & ST_IS_INTENT_IN_ARGUMENT;} 00509 inline void 00510 Set_ST_is_intent_in_argument (ST& s) { s.flags_ext |= ST_IS_INTENT_IN_ARGUMENT; } 00511 inline void 00512 Clear_ST_is_intent_in_argument (ST& s) { s.flags_ext &= ~ST_IS_INTENT_IN_ARGUMENT; } 00513 00514 inline BOOL 00515 ST_is_intent_out_argument (const ST& s) { return s.flags_ext & ST_IS_INTENT_OUT_ARGUMENT;} 00516 inline void 00517 Set_ST_is_intent_out_argument (ST& s) { s.flags_ext |= ST_IS_INTENT_OUT_ARGUMENT; } 00518 inline void 00519 Clear_ST_is_intent_out_argument (ST& s) { s.flags_ext &= ~ST_IS_INTENT_OUT_ARGUMENT; } 00520 00521 inline BOOL 00522 ST_is_assign_interface (const ST& s) { return s.flags_ext & ST_IS_ASSIGN_INTERFACE;} 00523 inline void 00524 Set_ST_is_assign_interface (ST& s) { s.flags_ext |= ST_IS_ASSIGN_INTERFACE; } 00525 inline void 00526 Clear_ST_is_assign_interface (ST& s) { s.flags_ext &= ~ST_IS_ASSIGN_INTERFACE; } 00527 00528 inline BOOL 00529 ST_is_operator_interface (const ST& s) { return s.flags_ext & ST_IS_OPERATOR_INTERFACE;} 00530 inline void 00531 Set_ST_is_operator_interface (ST& s) { s.flags_ext |= ST_IS_OPERATOR_INTERFACE; } 00532 inline void 00533 Clear_ST_is_operator_interface (ST& s) { s.flags_ext &= ~ST_IS_OPERATOR_INTERFACE; } 00534 00535 inline BOOL 00536 ST_is_u_operator_interface (const ST& s) { return s.flags_ext & ST_IS_U_OPERATOR_INTERFACE;} 00537 inline void 00538 Set_ST_is_u_operator_interface (ST& s) { s.flags_ext |= ST_IS_U_OPERATOR_INTERFACE; } 00539 inline void 00540 Clear_ST_is_u_operator_interface (ST& s) { s.flags_ext &= ~ST_IS_U_OPERATOR_INTERFACE; } 00541 00542 inline BOOL 00543 ST_is_parameter (const ST& s) { return s.flags_ext & ST_IS_PARAMETER;} 00544 inline void 00545 Set_ST_is_parameter (ST& s) { s.flags_ext |= ST_IS_PARAMETER; } 00546 inline void 00547 Clear_ST_is_parameter (ST& s) { s.flags_ext &= ~ST_IS_PARAMETER; } 00548 00549 00550 inline BOOL 00551 ST_is_temp_var (const ST& s) { return s.flags & ST_IS_TEMP_VAR;} 00552 inline void 00553 Set_ST_is_temp_var (ST& s) { s.flags |= ST_IS_TEMP_VAR; } 00554 inline void 00555 Clear_ST_is_temp_var (ST& s) { s.flags &= ~ST_IS_TEMP_VAR; } 00556 00557 inline BOOL 00558 ST_is_const_var (const ST& s) { return s.flags & ST_IS_CONST_VAR;} 00559 inline void 00560 Set_ST_is_const_var (ST& s) { s.flags |= ST_IS_CONST_VAR; } 00561 inline void 00562 Clear_ST_is_const_var (ST& s) { s.flags &= ~ST_IS_CONST_VAR; } 00563 00564 inline BOOL 00565 ST_addr_saved (const ST& s) { return s.flags & ST_ADDR_SAVED;} 00566 inline void 00567 Set_ST_addr_saved (ST& s) { s.flags |= ST_ADDR_SAVED; } 00568 inline void 00569 Clear_ST_addr_saved (ST& s) { s.flags &= ~ST_ADDR_SAVED; } 00570 00571 inline BOOL 00572 ST_addr_passed (const ST& s) { return s.flags & ST_ADDR_PASSED;} 00573 inline void 00574 Set_ST_addr_passed (ST& s) { s.flags |= ST_ADDR_PASSED; } 00575 inline void 00576 Clear_ST_addr_passed (ST& s) { s.flags &= ~ST_ADDR_PASSED; } 00577 00578 inline BOOL 00579 ST_is_thread_private (const ST& s) { return s.flags & ST_IS_THREAD_PRIVATE;} 00580 inline void 00581 Set_ST_is_thread_private (ST& s) { s.flags |= ST_IS_THREAD_PRIVATE; } 00582 inline void 00583 Clear_ST_is_thread_private (ST& s) { s.flags &= ~ST_IS_THREAD_PRIVATE; } 00584 00585 inline BOOL 00586 ST_pt_to_unique_mem (const ST& s) { return s.flags & ST_PT_TO_UNIQUE_MEM;} 00587 inline void 00588 Set_ST_pt_to_unique_mem (ST& s) { s.flags |= ST_PT_TO_UNIQUE_MEM; } 00589 inline void 00590 Clear_ST_pt_to_unique_mem (ST& s) { s.flags &= ~ST_PT_TO_UNIQUE_MEM; } 00591 00592 inline BOOL 00593 ST_pt_to_compiler_generated_mem (const ST& s) 00594 { return s.flags & ST_PT_TO_COMPILER_GENERATED_MEM;} 00595 inline void 00596 Set_ST_pt_to_compiler_generated_mem (ST& s) 00597 { s.flags |= ST_PT_TO_COMPILER_GENERATED_MEM; } 00598 inline void 00599 Clear_ST_pt_to_compiler_generated_mem (ST& s) 00600 { s.flags &= ~ST_PT_TO_COMPILER_GENERATED_MEM; } 00601 00602 inline BOOL 00603 ST_is_shared_auto (const ST& s) { return s.flags & ST_IS_SHARED_AUTO;} 00604 inline void 00605 Set_ST_is_shared_auto (ST& s) { s.flags |= ST_IS_SHARED_AUTO; } 00606 inline void 00607 Clear_ST_is_shared_auto (ST& s) { s.flags &= ~ST_IS_SHARED_AUTO; } 00608 00609 inline BOOL 00610 ST_assigned_to_dedicated_preg (const ST& s) 00611 { return s.flags & ST_ASSIGNED_TO_DEDICATED_PREG; } 00612 inline void 00613 Set_ST_assigned_to_dedicated_preg (ST& s) 00614 { s.flags |= ST_ASSIGNED_TO_DEDICATED_PREG; } 00615 inline void 00616 Clear_ST_assigned_to_dedicated_preg (ST& s) 00617 { s.flags &= ~ST_ASSIGNED_TO_DEDICATED_PREG; } 00618 00619 inline BOOL 00620 ST_asm_function_st(const ST& s) { return s.flags & ST_ASM_FUNCTION_ST; } 00621 inline void 00622 Set_ST_asm_function_st(ST &s) { s.flags |= ST_ASM_FUNCTION_ST; } 00623 inline void 00624 Clear_ST_asm_function_st(ST &s) { s.flags &= ~ST_ASM_FUNCTION_ST; } 00625 00626 // TODO: should probably replace all ref params with ST* 00627 inline BOOL 00628 ST_has_named_section (const ST* s) { return s->flags & ST_HAS_NAMED_SECTION; } 00629 inline void 00630 Set_ST_has_named_section (ST* s) { s->flags |= ST_HAS_NAMED_SECTION; } 00631 inline void 00632 Clear_ST_has_named_section (ST* s) { s->flags &= ~ST_HAS_NAMED_SECTION; } 00633 00634 inline BOOL 00635 ST_one_per_pu (const ST* s) { return s->flags_ext & ST_ONE_PER_PU; } 00636 inline void 00637 Set_ST_one_per_pu (ST* s) { s->flags_ext |= ST_ONE_PER_PU; } 00638 inline void 00639 Clear_ST_one_per_pu (ST* s) { s->flags_ext &= ~ST_ONE_PER_PU; } 00640 00641 inline BOOL 00642 ST_copy_constructor_st(const ST* s) { return s->flags_ext & ST_COPY_CONSTRUCTOR_ST; } 00643 inline void 00644 Set_ST_copy_constructor_st(ST* s) { s->flags_ext |= ST_COPY_CONSTRUCTOR_ST; } 00645 inline void 00646 Clear_ST_copy_constructor_st(ST* s) { s->flags_ext &= ~ST_COPY_CONSTRUCTOR_ST; } 00647 00648 inline BOOL 00649 ST_initv_in_other_st (const ST* s) { return s->flags_ext & ST_INITV_IN_OTHER_ST; } 00650 inline void 00651 Set_ST_initv_in_other_st (ST* s) { s->flags_ext |= ST_INITV_IN_OTHER_ST; } 00652 inline void 00653 Clear_ST_initv_in_other_st (ST* s) { s->flags_ext &= ~ST_INITV_IN_OTHER_ST; } 00654 00655 inline BOOL 00656 ST_is_inintialized_in_f90 (const ST* s) { return s->flags_ext & ST_IS_INITIALIZED_IN_F90; } 00657 inline void 00658 Set_ST_is_inintialized_in_f90 (ST *s) { s->flags_ext |= ST_IS_INITIALIZED_IN_F90; } 00659 inline void 00660 Clear_ST_is_inintialized_in_f90 (ST *s) { s->flags_ext &= ~ST_IS_INITIALIZED_IN_F90; } 00661 00662 //---------------------------------------------------------------------- 00663 // access functions for PU 00664 //---------------------------------------------------------------------- 00665 00666 inline TARGET_INFO_IDX 00667 PU_target_idx (const PU& pu) { return pu.target_idx; } 00668 inline void 00669 Set_PU_target_idx (PU& pu, TARGET_INFO_IDX idx) { pu.target_idx = idx; } 00670 00671 inline TY_IDX 00672 PU_prototype (const PU& pu) { return pu.prototype; } 00673 inline void 00674 Set_PU_prototype (PU& pu, TY_IDX ty) { pu.prototype = ty; } 00675 00676 inline UINT8 00677 PU_gp_group (const PU& pu) { return pu.gp_group; } 00678 inline void 00679 Set_PU_gp_group (PU& pu, mUINT8 grp) { pu.gp_group = grp; } 00680 00681 inline SYMTAB_IDX 00682 PU_lexical_level (const PU& pu) { return pu.lexical_level; } 00683 inline void 00684 Set_PU_lexical_level (PU& pu, SYMTAB_IDX l) { pu.lexical_level = l; } 00685 00686 //---------------------------------------------------------------------- 00687 // PU flags 00688 //---------------------------------------------------------------------- 00689 00690 inline BOOL 00691 PU_is_pure (const PU& pu) { return pu.flags & PU_IS_PURE; } 00692 inline void 00693 Set_PU_is_pure (PU& pu) { pu.flags |= PU_IS_PURE; } 00694 inline void 00695 Clear_PU_is_pure (PU& pu) { pu.flags &= ~PU_IS_PURE; } 00696 00697 inline BOOL 00698 PU_no_side_effects (const PU& pu) { return pu.flags & PU_NO_SIDE_EFFECTS; } 00699 inline void 00700 Set_PU_no_side_effects (PU& pu) { pu.flags |= PU_NO_SIDE_EFFECTS; } 00701 inline void 00702 Clear_PU_no_side_effects (PU& pu) { pu.flags &= ~PU_NO_SIDE_EFFECTS; } 00703 00704 inline BOOL 00705 PU_decl_view (const PU& pu) { return (pu.flags & PU_DECL_VIEW)!=0; } 00706 inline void 00707 Set_PU_decl_view (PU& pu) { pu.flags |= PU_DECL_VIEW; } 00708 inline void 00709 Clear_PU_decl_view (PU& pu) { pu.flags &= ~PU_DECL_VIEW; } 00710 00711 inline BOOL 00712 PU_decl_view (const PU_IDX pui) { return PU_decl_view(Pu_Table[pui]); } 00713 inline void 00714 Set_PU_decl_view (PU_IDX pui) { Set_PU_decl_view(Pu_Table[pui]); } 00715 inline void 00716 Clear_PU_decl_view (PU_IDX pui) { Clear_PU_decl_view(Pu_Table[pui]); } 00717 00718 00719 inline BOOL 00720 PU_is_inline_function (const PU& pu) { return pu.flags & PU_IS_INLINE_FUNCTION; } 00721 inline void 00722 Set_PU_is_inline_function (PU& pu) { pu.flags |= PU_IS_INLINE_FUNCTION; } 00723 inline void 00724 Clear_PU_is_inline_function (PU& pu) { pu.flags &= ~PU_IS_INLINE_FUNCTION; } 00725 00726 inline BOOL 00727 PU_no_inline (const PU& pu) { return pu.flags & PU_NO_INLINE; } 00728 inline void 00729 Set_PU_no_inline (PU& pu) { pu.flags |= PU_NO_INLINE; } 00730 inline void 00731 Clear_PU_no_inline (PU& pu) { pu.flags &= ~PU_NO_INLINE; } 00732 00733 inline BOOL 00734 PU_must_inline (const PU& pu) { return pu.flags & PU_MUST_INLINE; } 00735 inline void 00736 Set_PU_must_inline (PU& pu) { pu.flags |= PU_MUST_INLINE; } 00737 inline void 00738 Clear_PU_must_inline (PU& pu) { pu.flags &= ~PU_MUST_INLINE; } 00739 00740 inline BOOL 00741 PU_no_delete (const PU& pu) { return pu.flags & PU_NO_DELETE; } 00742 inline void 00743 Set_PU_no_delete (PU& pu) { pu.flags |= PU_NO_DELETE; } 00744 inline void 00745 Clear_PU_no_delete (PU& pu) { pu.flags &= ~PU_NO_DELETE; } 00746 00747 inline BOOL 00748 PU_has_exc_scopes (const PU& pu) { return pu.flags & PU_HAS_EXC_SCOPES; } 00749 inline void 00750 Set_PU_has_exc_scopes (PU& pu) { pu.flags |= PU_HAS_EXC_SCOPES; } 00751 inline void 00752 Clear_PU_has_exc_scopes (PU& pu) { pu.flags &= ~PU_HAS_EXC_SCOPES; } 00753 00754 inline BOOL 00755 PU_is_nested_func (const PU& pu) { return pu.flags & PU_IS_NESTED_FUNC; } 00756 inline void 00757 Set_PU_is_nested_func (PU& pu) { pu.flags |= PU_IS_NESTED_FUNC; } 00758 inline void 00759 Clear_PU_is_nested_func (PU& pu) { pu.flags &= ~PU_IS_NESTED_FUNC; } 00760 00761 inline BOOL 00762 PU_has_non_mangled_call (const PU& pu) { return pu.flags & PU_HAS_NON_MANGLED_CALL; } 00763 inline void 00764 Set_PU_has_non_mangled_call (PU& pu) { pu.flags |= PU_HAS_NON_MANGLED_CALL; } 00765 inline void 00766 Clear_PU_has_non_mangled_call (PU& pu) { pu.flags &= ~PU_HAS_NON_MANGLED_CALL; } 00767 00768 inline BOOL 00769 PU_args_aliased (const PU& pu) { return pu.flags & PU_ARGS_ALIASED; } 00770 inline void 00771 Set_PU_args_aliased (PU& pu) { pu.flags |= PU_ARGS_ALIASED; } 00772 inline void 00773 Clear_PU_args_aliased (PU& pu) { pu.flags &= ~PU_ARGS_ALIASED; } 00774 00775 00776 inline BOOL 00777 PU_need_unparsed (const PU& pu) { return (pu.flags & PU_NEED_UNPARSED)!=0; } 00778 inline void 00779 Set_PU_need_unparsed (PU& pu) { pu.flags |= PU_NEED_UNPARSED; } 00780 inline void 00781 Clear_PU_need_unparsed (PU& pu) { pu.flags &= ~PU_NEED_UNPARSED; } 00782 00783 inline BOOL 00784 PU_need_unparsed (const PU_IDX pui) { return PU_need_unparsed(Pu_Table[pui]); } 00785 inline void 00786 Set_PU_need_unparsed (PU_IDX pui) { Set_PU_need_unparsed(Pu_Table[pui]); } 00787 inline void 00788 Clear_PU_need_unparsed (PU_IDX pui) { Clear_PU_need_unparsed(Pu_Table[pui]);} 00789 00790 00791 inline BOOL 00792 PU_needs_fill_align_lowering (const PU& pu) { 00793 return pu.flags & PU_NEEDS_FILL_ALIGN_LOWERING; 00794 } 00795 inline void 00796 Set_PU_needs_fill_align_lowering (PU& pu) { 00797 pu.flags |= PU_NEEDS_FILL_ALIGN_LOWERING; 00798 } 00799 inline void 00800 Clear_PU_needs_fill_align_lowering (PU& pu) { 00801 pu.flags &= ~PU_NEEDS_FILL_ALIGN_LOWERING; 00802 } 00803 00804 inline BOOL 00805 PU_needs_t9 (const PU& pu) { return pu.flags & PU_NEEDS_T9; } 00806 inline void 00807 Set_PU_needs_t9 (PU& pu) { pu.flags |= PU_NEEDS_T9; } 00808 inline void 00809 Clear_PU_needs_t9 (PU& pu) { pu.flags &= ~PU_NEEDS_T9; } 00810 00811 inline BOOL 00812 PU_has_very_high_whirl (const PU& pu) { return pu.flags & PU_HAS_VERY_HIGH_WHIRL; } 00813 inline void 00814 Set_PU_has_very_high_whirl (PU& pu) { pu.flags |= PU_HAS_VERY_HIGH_WHIRL; } 00815 inline void 00816 Clear_PU_has_very_high_whirl (PU& pu) { pu.flags &= ~PU_HAS_VERY_HIGH_WHIRL; } 00817 00818 inline BOOL 00819 PU_has_altentry (const PU& pu) { return pu.flags & PU_HAS_ALTENTRY; } 00820 inline void 00821 Set_PU_has_altentry (PU& pu) { pu.flags |= PU_HAS_ALTENTRY; } 00822 inline void 00823 Clear_PU_has_altentry (PU& pu) { pu.flags &= ~PU_HAS_ALTENTRY; } 00824 00825 inline BOOL 00826 PU_recursive (const PU& pu) { return pu.flags & PU_RECURSIVE; } 00827 inline void 00828 Set_PU_recursive (PU& pu) { pu.flags |= PU_RECURSIVE; } 00829 inline void 00830 Clear_PU_recursive (PU& pu) { pu.flags &= ~PU_RECURSIVE; } 00831 00832 inline BOOL 00833 PU_is_mainpu (const PU& pu) { return pu.flags & PU_IS_MAINPU; } 00834 inline void 00835 Set_PU_is_mainpu (PU& pu) { pu.flags |= PU_IS_MAINPU; } 00836 inline void 00837 Clear_PU_is_mainpu (PU& pu) { pu.flags &= ~PU_IS_MAINPU; } 00838 00839 inline BOOL 00840 PU_uplevel (const PU& pu) { return pu.flags & PU_UPLEVEL; } 00841 inline void 00842 Set_PU_uplevel (PU& pu) { pu.flags |= PU_UPLEVEL; } 00843 inline void 00844 Clear_PU_uplevel (PU& pu) { pu.flags &= ~PU_UPLEVEL; } 00845 00846 inline BOOL 00847 PU_mp_needs_lno (const PU& pu) { return pu.flags & PU_MP_NEEDS_LNO; } 00848 inline void 00849 Set_PU_mp_needs_lno (PU& pu) { pu.flags |= PU_MP_NEEDS_LNO; } 00850 inline void 00851 Clear_PU_mp_needs_lno (PU& pu) { pu.flags &= ~PU_MP_NEEDS_LNO; } 00852 00853 inline BOOL 00854 PU_has_alloca (const PU& pu) { return pu.flags & PU_HAS_ALLOCA; } 00855 inline void 00856 Set_PU_has_alloca (PU& pu) { pu.flags |= PU_HAS_ALLOCA; } 00857 inline void 00858 Clear_PU_has_alloca (PU& pu) { pu.flags &= ~PU_HAS_ALLOCA; } 00859 00860 inline BOOL 00861 PU_in_elf_section (const PU& pu) { return pu.flags & PU_IN_ELF_SECTION; } 00862 inline void 00863 Set_PU_in_elf_section (PU& pu) { pu.flags |= PU_IN_ELF_SECTION; } 00864 inline void 00865 Clear_PU_in_elf_section (PU& pu) { pu.flags &= ~PU_IN_ELF_SECTION; } 00866 00867 inline BOOL 00868 PU_has_mp (const PU& pu) { return pu.flags & PU_HAS_MP; } 00869 inline void 00870 Set_PU_has_mp (PU& pu) { pu.flags |= PU_HAS_MP; } 00871 inline void 00872 Clear_PU_has_mp (PU& pu) { pu.flags &= ~PU_HAS_MP; } 00873 00874 inline BOOL 00875 PU_mp (const PU& pu) { return pu.flags & PU_MP; } 00876 inline void 00877 Set_PU_mp (PU& pu) { pu.flags |= PU_MP; } 00878 inline void 00879 Clear_PU_mp (PU& pu) { pu.flags &= ~PU_MP; } 00880 00881 inline BOOL 00882 PU_has_namelist (const PU& pu) { return pu.flags & PU_HAS_NAMELIST; } 00883 inline void 00884 Set_PU_has_namelist (PU& pu) { pu.flags |= PU_HAS_NAMELIST; } 00885 inline void 00886 Clear_PU_has_namelist (PU& pu) { pu.flags &= ~PU_HAS_NAMELIST; } 00887 00888 inline BOOL 00889 PU_has_return_address (const PU& pu) { return pu.flags & PU_HAS_RETURN_ADDRESS; } 00890 inline void 00891 Set_PU_has_return_address (PU& pu) { pu.flags |= PU_HAS_RETURN_ADDRESS; } 00892 inline void 00893 Clear_PU_has_return_address (PU& pu) { pu.flags &= ~PU_HAS_RETURN_ADDRESS; } 00894 00895 inline BOOL 00896 PU_has_region (const PU& pu) { return pu.flags & PU_HAS_REGION; } 00897 inline void 00898 Set_PU_has_region (PU& pu) { pu.flags |= PU_HAS_REGION; } 00899 inline void 00900 Clear_PU_has_region (PU& pu) { pu.flags &= ~PU_HAS_REGION; } 00901 00902 inline BOOL 00903 PU_has_inlines (const PU& pu) { return pu.flags & PU_HAS_INLINES; } 00904 inline void 00905 Set_PU_has_inlines (PU& pu) { pu.flags |= PU_HAS_INLINES; } 00906 inline void 00907 Clear_PU_has_inlines (PU& pu) { pu.flags &= ~PU_HAS_INLINES; } 00908 00909 inline BOOL 00910 PU_calls_setjmp (const PU& pu) { return pu.flags & PU_CALLS_SETJMP; } 00911 inline void 00912 Set_PU_calls_setjmp (PU& pu) { pu.flags |= PU_CALLS_SETJMP; } 00913 inline void 00914 Clear_PU_calls_setjmp (PU& pu) { pu.flags &= ~PU_CALLS_SETJMP; } 00915 00916 inline BOOL 00917 PU_calls_longjmp (const PU& pu) { return pu.flags & PU_CALLS_LONGJMP; } 00918 inline void 00919 Set_PU_calls_longjmp (PU& pu) { pu.flags |= PU_CALLS_LONGJMP; } 00920 inline void 00921 Clear_PU_calls_longjmp (PU& pu) { pu.flags &= ~PU_CALLS_LONGJMP; } 00922 00923 inline BOOL 00924 PU_ipa_addr_analysis (const PU& pu) { return pu.flags & PU_IPA_ADDR_ANALYSIS; } 00925 inline void 00926 Set_PU_ipa_addr_analysis (PU& pu) { pu.flags |= PU_IPA_ADDR_ANALYSIS; } 00927 inline void 00928 Clear_PU_ipa_addr_analysis (PU& pu) { pu.flags &= ~PU_IPA_ADDR_ANALYSIS; } 00929 00930 inline BOOL 00931 PU_smart_addr_analysis (const PU& pu) { return pu.flags & PU_SMART_ADDR_ANALYSIS; } 00932 inline void 00933 Set_PU_smart_addr_analysis (PU& pu) { pu.flags |= PU_SMART_ADDR_ANALYSIS; } 00934 inline void 00935 Clear_PU_smart_addr_analysis (PU& pu) { pu.flags &= ~PU_SMART_ADDR_ANALYSIS; } 00936 00937 inline BOOL 00938 PU_has_global_pragmas (const PU& pu) { return pu.flags & PU_HAS_GLOBAL_PRAGMAS; } 00939 inline void 00940 Set_PU_has_global_pragmas (PU& pu) { pu.flags |= PU_HAS_GLOBAL_PRAGMAS; } 00941 inline void 00942 Clear_PU_has_global_pragmas (PU& pu) { pu.flags &= ~PU_HAS_GLOBAL_PRAGMAS; } 00943 00944 inline BOOL 00945 PU_has_user_alloca (const PU& pu) { return (pu.flags & PU_HAS_USER_ALLOCA) != 0; } 00946 inline void 00947 Set_PU_has_user_alloca (PU& pu) { pu.flags |= PU_HAS_USER_ALLOCA; } 00948 inline void 00949 Clear_PU_has_user_alloca (PU& pu) { pu.flags &= ~PU_HAS_USER_ALLOCA; } 00950 00951 inline BOOL 00952 PU_has_unknown_control_flow (const PU& pu) { return (pu.flags & PU_HAS_UNKNOWN_CONTROL_FLOW) != 0; } 00953 inline void 00954 Set_PU_has_unknown_control_flow (PU& pu) { pu.flags |= PU_HAS_UNKNOWN_CONTROL_FLOW; } 00955 inline void 00956 Clear_PU_has_unknown_control_flow (PU& pu) { pu.flags &= ~PU_HAS_UNKNOWN_CONTROL_FLOW; } 00957 00958 inline BOOL 00959 PU_has_syscall_linkage (const PU& pu) { return pu.flags & PU_HAS_SYSCALL_LINKAGE; } 00960 inline void 00961 Set_PU_has_syscall_linkage (PU& pu) { pu.flags |= PU_HAS_SYSCALL_LINKAGE; } 00962 inline void 00963 Clear_PU_has_syscall_linkage (PU& pu) { pu.flags &= ~PU_HAS_SYSCALL_LINKAGE; } 00964 00965 inline BOOL 00966 PU_is_thunk (const PU& pu) { return (pu.flags & PU_IS_THUNK) != 0; } 00967 inline void 00968 Set_PU_is_thunk (PU& pu) { pu.flags |= PU_IS_THUNK; } 00969 inline void 00970 Clear_PU_is_thunk (PU& pu) { pu.flags &= ~PU_IS_THUNK; } 00971 inline BOOL 00972 PU_needs_manual_unwinding (const PU& pu) { return (pu.flags & PU_NEEDS_MANUAL_UNWINDING) != 0;} 00973 inline void 00974 Set_PU_needs_manual_unwinding (PU& pu) { pu.flags |= PU_NEEDS_MANUAL_UNWINDING;} 00975 inline void 00976 Clear_PU_needs_manual_unwinding (PU& pu) { pu.flags &= ~PU_NEEDS_MANUAL_UNWINDING;} 00977 #ifdef TARG_X8664 00978 inline BOOL 00979 PU_ff2c_abi (const PU& pu) { return (pu.flags & PU_FF2C_ABI) != 0;} 00980 inline void 00981 Set_PU_ff2c_abi (PU& pu) { pu.flags |= PU_FF2C_ABI; } 00982 inline void 00983 Clear_PU_ff2c_abi (PU& pu) { pu.flags &= ~PU_FF2C_ABI; } 00984 #endif 00985 00986 inline UINT64 00987 PU_src_lang (const PU& pu) { return pu.src_lang; } 00988 00989 inline BOOL 00990 PU_mixed_lang (const PU& pu) { return (pu.src_lang & PU_MIXED_LANG) != 0; } 00991 inline void 00992 Set_PU_mixed_lang (PU& pu) { pu.src_lang |= PU_MIXED_LANG; } 00993 inline void 00994 Clear_PU_mixed_lang (PU& pu) { pu.src_lang &= ~PU_MIXED_LANG; } 00995 00996 inline BOOL 00997 PU_c_lang (const PU& pu) { return (pu.src_lang & PU_C_LANG) != 0; } 00998 inline void 00999 Set_PU_c_lang (PU& pu) { pu.src_lang |= PU_C_LANG; } 01000 inline void 01001 Clear_PU_c_lang (PU& pu) { pu.src_lang &= ~PU_C_LANG; } 01002 01003 inline BOOL 01004 PU_cxx_lang (const PU& pu) { return (pu.src_lang & PU_CXX_LANG) != 0; } 01005 inline void 01006 Set_PU_cxx_lang (PU& pu) { pu.src_lang |= PU_CXX_LANG; } 01007 inline void 01008 Clear_PU_cxx_lang (PU& pu) { pu.src_lang &= ~PU_CXX_LANG; } 01009 01010 inline BOOL 01011 PU_f77_lang (const PU& pu) { return (pu.src_lang & PU_F77_LANG) != 0; } 01012 inline void 01013 Set_PU_f77_lang (PU& pu) { pu.src_lang |= PU_F77_LANG; } 01014 inline void 01015 Clear_PU_f77_lang (PU& pu) { pu.src_lang &= ~PU_F77_LANG; } 01016 01017 inline BOOL 01018 PU_f90_lang (const PU& pu) { return (pu.src_lang & PU_F90_LANG) != 0; } 01019 inline void 01020 Set_PU_f90_lang (PU& pu) { pu.src_lang |= PU_F90_LANG; } 01021 inline void 01022 Clear_PU_f90_lang (PU& pu) { pu.src_lang &= ~PU_F90_LANG; } 01023 01024 inline BOOL 01025 PU_java_lang (const PU& pu) { return (pu.src_lang & PU_JAVA_LANG) != 0; } 01026 inline void 01027 Set_PU_java_lang (PU& pu) { pu.src_lang |= PU_JAVA_LANG; } 01028 inline void 01029 Clear_PU_java_lang (PU& pu) { pu.src_lang &= ~PU_JAVA_LANG; } 01030 01031 // PU_ftn_lang (f77 or f90) is defined in symtab.h 01032 // PU_has_nested (f77 or f90) is defined in symtab.h 01033 //---------------------------------------------------------------------- 01034 // access functions for TY 01035 //---------------------------------------------------------------------- 01036 01037 inline UINT64 01038 TY_size (const TY& ty) { return ty.size; } 01039 inline void 01040 Set_TY_size (TY& ty, UINT64 size) { ty.size = size; } 01041 inline void 01042 Set_TY_size (TY_IDX tyi, UINT64 size) { 01043 Set_TY_size(Ty_Table[tyi], size); 01044 } 01045 01046 inline TY_KIND 01047 TY_kind (const TY& ty) { return ty.kind; } 01048 inline void 01049 Set_TY_kind (TY& ty, TY_KIND kind) { ty.kind = kind; } 01050 inline void 01051 Set_TY_kind (TY_IDX tyi, TY_KIND kind) { Set_TY_kind(Ty_Table[tyi], kind); } 01052 01053 inline TYPE_ID 01054 TY_mtype (const TY& ty) { return ty.mtype; } 01055 inline void 01056 Set_TY_mtype (TY& ty, TYPE_ID mtype) { ty.mtype = mtype; } 01057 inline void 01058 Set_TY_mtype (TY_IDX tyi, TYPE_ID mtype){ Set_TY_mtype(Ty_Table[tyi],mtype); } 01059 01060 inline UINT16 01061 TY_flags (const TY& ty) { return ty.flags; } 01062 inline void 01063 Set_TY_flags (TY& ty, mUINT16 flags) { ty.flags = flags; } 01064 inline UINT16 01065 TY_flags (const TY_IDX tyi) { return TY_flags(Ty_Table[tyi]); } 01066 inline void 01067 Set_TY_flags (TY_IDX tyi, mUINT16 flags){ Set_TY_flags(Ty_Table[tyi],flags); } 01068 01069 inline FLD_HANDLE 01070 TY_fld (const TY& ty) { return FLD_HANDLE (ty.Fld ()); } 01071 inline void 01072 Set_TY_fld (TY& ty, FLD_HANDLE fld) { ty.Set_fld (fld.Idx()); } 01073 inline FLD_HANDLE 01074 TY_fld (const TY_IDX tyi) { return TY_fld(Ty_Table[tyi]); } 01075 inline void 01076 Set_TY_fld (TY_IDX tyi, FLD_HANDLE fld) { Set_TY_fld(Ty_Table[tyi], fld); } 01077 01078 inline TYLIST_IDX 01079 TY_tylist (const TY& ty) { return ty.Tylist (); } 01080 inline void 01081 Set_TY_tylist (TY& ty, TYLIST_IDX idx) { ty.Set_tylist (idx); } 01082 inline TYLIST_IDX 01083 TY_tylist (const TY_IDX tyi) { return TY_tylist(Ty_Table[tyi]); } 01084 inline void 01085 Set_TY_tylist (TY_IDX tyi, TYLIST_IDX idx) { 01086 Set_TY_tylist(Ty_Table[tyi],idx); 01087 } 01088 01089 inline ARB_HANDLE 01090 TY_arb (const TY& ty) { return ARB_HANDLE(ty.Arb ()); } 01091 inline void 01092 Set_TY_arb (TY& ty, ARB_HANDLE idx) { ty.Set_arb (idx.Idx()); } 01093 inline ARB_HANDLE 01094 TY_arb (const TY_IDX tyi) { return TY_arb(Ty_Table[tyi]); } 01095 inline void 01096 Set_TY_arb (TY_IDX tyi, ARB_HANDLE idx) { Set_TY_arb(Ty_Table[tyi], idx); } 01097 01098 01099 inline STR_IDX 01100 TY_name_idx (const TY& ty) { return ty.name_idx; } 01101 inline void 01102 Set_TY_name_idx (TY& ty, UINT64 name) { ty.name_idx = name; } 01103 inline STR_IDX 01104 TY_name_idx (const TY_IDX tyi) { return TY_name_idx(Ty_Table[tyi]); } 01105 inline void 01106 Set_TY_name_idx (TY_IDX tyi, UINT64 name) { 01107 Set_TY_name_idx(Ty_Table[tyi], name); 01108 } 01109 inline char * 01110 TY_name (const TY& ty) { return &Str_Table[ty.name_idx]; } 01111 01112 inline TY_IDX 01113 TY_etype (const TY& ty) { return ty.Etype (); } 01114 inline void 01115 Set_TY_etype (TY& ty, TY_IDX idx) { ty.Set_etype (idx); } 01116 inline TY_IDX 01117 TY_etype (const TY_IDX tyi) { return TY_etype(Ty_Table[tyi]); } 01118 inline void 01119 Set_TY_etype (TY_IDX tyi, TY_IDX idx) { Set_TY_etype(Ty_Table[tyi],idx); } 01120 01121 inline TY_IDX 01122 TY_pointed (const TY& ty) { return ty.Pointed (); } 01123 inline void 01124 Set_TY_pointed (TY& ty, TY_IDX idx) { ty.Set_pointed (idx); } 01125 inline TY_IDX 01126 TY_pointed (const TY_IDX tyi) { return Ty_Table[tyi].Pointed (); } 01127 inline void 01128 Set_TY_pointed (TY_IDX tyi, TY_IDX idx) { Set_TY_pointed(Ty_Table[tyi],idx); } 01129 01130 inline ST_IDX 01131 TY_copy_constructor (const TY& ty) { return ty.Copy_constructor (); } 01132 inline void 01133 Set_TY_copy_constructor (TY& ty, ST_IDX idx) { ty.Set_copy_constructor (idx); } 01134 inline ST_IDX 01135 TY_copy_constructor (const TY_IDX tyi) { return Ty_Table[tyi].Copy_constructor (); } 01136 inline void 01137 Set_TY_copy_constructor (TY_IDX tyi, ST_IDX idx) { Set_TY_copy_constructor(Ty_Table[tyi],idx); } 01138 01139 //---------------------------------------------------------------------- 01140 // TY flags 01141 //---------------------------------------------------------------------- 01142 01143 inline BOOL 01144 TY_is_character (const TY& ty) { return ty.flags & TY_IS_CHARACTER; } 01145 inline void 01146 Set_TY_is_character (TY& ty) { ty.flags |= TY_IS_CHARACTER; } 01147 inline void 01148 Clear_TY_is_character (TY& ty) { ty.flags &= ~TY_IS_CHARACTER; } 01149 inline BOOL 01150 TY_is_character (const TY_IDX tyi) { return TY_is_character(Ty_Table[tyi]); } 01151 inline void 01152 Set_TY_is_character (TY_IDX tyi) { Set_TY_is_character(Ty_Table[tyi]); } 01153 inline void 01154 Clear_TY_is_character (TY_IDX tyi) { Clear_TY_is_character(Ty_Table[tyi]); } 01155 01156 inline BOOL 01157 TY_is_logical (const TY& ty) { return ty.flags & TY_IS_LOGICAL; } 01158 inline void 01159 Set_TY_is_logical (TY& ty) { ty.flags |= TY_IS_LOGICAL; } 01160 inline void 01161 Clear_TY_is_logical (TY& ty) { ty.flags &= ~TY_IS_LOGICAL; } 01162 inline BOOL 01163 TY_is_logical (const TY_IDX tyi) { return TY_is_logical(Ty_Table[tyi]); } 01164 inline void 01165 Set_TY_is_logical (TY_IDX tyi) { Set_TY_is_logical(Ty_Table[tyi]); } 01166 inline void 01167 Clear_TY_is_logical (TY_IDX tyi) { Clear_TY_is_logical(Ty_Table[tyi]); } 01168 01169 inline BOOL 01170 TY_is_sequence (const TY& ty) { return ty.flags & TY_IS_SEQUENCE; } 01171 inline void 01172 Set_TY_is_sequence (TY& ty) { ty.flags |= TY_IS_SEQUENCE; } 01173 inline void 01174 Clear_TY_is_sequence (TY& ty) { ty.flags &= ~TY_IS_SEQUENCE; } 01175 inline BOOL 01176 TY_is_sequence (const TY_IDX tyi) { return TY_is_sequence(Ty_Table[tyi]); } 01177 inline void 01178 Set_TY_is_sequence (TY_IDX tyi) { Set_TY_is_sequence(Ty_Table[tyi]); } 01179 inline void 01180 Clear_TY_is_sequence (TY_IDX tyi) { Clear_TY_is_sequence(Ty_Table[tyi]); } 01181 01182 01183 inline BOOL 01184 TY_is_union (const TY& ty) { return ty.flags & TY_IS_UNION; } 01185 inline void 01186 Set_TY_is_union (TY& ty) { ty.flags |= TY_IS_UNION; } 01187 inline void 01188 Clear_TY_is_union (TY& ty) { ty.flags &= ~TY_IS_UNION; } 01189 inline BOOL 01190 TY_is_union (const TY_IDX tyi) { return TY_is_union(Ty_Table[tyi]); } 01191 inline void 01192 Set_TY_is_union (TY_IDX tyi) { Set_TY_is_union(Ty_Table[tyi]); } 01193 inline void 01194 Clear_TY_is_union (TY_IDX tyi) { Clear_TY_is_union(Ty_Table[tyi]); } 01195 01196 inline BOOL 01197 TY_is_packed (const TY& ty) { return ty.flags & TY_IS_PACKED; } 01198 inline void 01199 Set_TY_is_packed (TY& ty) { ty.flags |= TY_IS_PACKED; } 01200 inline void 01201 Clear_TY_is_packed (TY& ty) { ty.flags &= ~TY_IS_PACKED; } 01202 inline BOOL 01203 TY_is_packed (const TY_IDX tyi) { return TY_is_packed(Ty_Table[tyi]); } 01204 inline void 01205 Set_TY_is_packed (TY_IDX tyi) { Set_TY_is_packed(Ty_Table[tyi]); } 01206 inline void 01207 Clear_TY_is_packed (TY_IDX tyi) { Clear_TY_is_packed(Ty_Table[tyi]); } 01208 01209 01210 01211 //------------------------------------------------------------------------------ 01212 // UPC specific functions 01213 //------------------------------------------------------------------------------ 01214 01215 inline UINT32 01216 TY_block_size (const TY& ty) { return ty.block_size;} 01217 inline void 01218 Set_TY_block_size (TY &ty, UINT32 size) {ty.block_size = size;} 01219 01220 inline UINT32 01221 TY_block_size (TY_IDX tyi) { return TY_block_size(Ty_Table[tyi]); } 01222 inline void 01223 Set_TY_block_size (TY_IDX tyi, UINT32 size) { Set_TY_block_size(Ty_Table[tyi], size); } 01224 01225 01226 inline BOOL 01227 TY_is_shared (const TY& ty) { return ty.flags & TY_IS_SHARED; } 01228 inline void 01229 Set_TY_is_shared (TY& ty) { ty.flags |= TY_IS_SHARED; } 01230 inline void 01231 Clear_TY_is_shared (TY& ty) { ty.flags &= ~TY_IS_SHARED; } 01232 inline BOOL 01233 TY_is_shared (const TY_IDX tyi) { return TY_is_shared(Ty_Table[tyi]); } 01234 inline void 01235 Set_TY_is_shared (TY_IDX tyi) { Set_TY_is_shared(Ty_Table[tyi]); } 01236 inline void 01237 Clear_TY_is_shared (TY_IDX tyi) { Clear_TY_is_shared(Ty_Table[tyi]); } 01238 01239 inline BOOL 01240 TY_is_strict (const TY& ty) { return ty.flags & TY_IS_STRICT; } 01241 inline void 01242 Set_TY_is_strict (TY& ty) { ty.flags |= TY_IS_STRICT; } 01243 inline void 01244 Clear_TY_is_strict (TY& ty) { ty.flags &= ~TY_IS_STRICT; } 01245 inline BOOL 01246 TY_is_strict (const TY_IDX tyi) { return TY_is_strict(Ty_Table[tyi]); } 01247 inline void 01248 Set_TY_is_strict (TY_IDX tyi) { Set_TY_is_strict(Ty_Table[tyi]); } 01249 inline void 01250 Clear_TY_is_strict (TY_IDX tyi) { Clear_TY_is_strict(Ty_Table[tyi]); } 01251 01252 inline BOOL 01253 TY_is_relaxed (const TY& ty) { return ty.flags & TY_IS_RELAXED; } 01254 inline void 01255 Set_TY_is_relaxed (TY& ty) { ty.flags |= TY_IS_RELAXED; } 01256 inline void 01257 Clear_TY_is_relaxed (TY& ty) { ty.flags &= ~TY_IS_RELAXED; } 01258 inline BOOL 01259 TY_is_relaxed (const TY_IDX tyi) { return TY_is_relaxed(Ty_Table[tyi]); } 01260 inline void 01261 Set_TY_is_relaxed (TY_IDX tyi) { Set_TY_is_relaxed(Ty_Table[tyi]); } 01262 inline void 01263 Clear_TY_is_relaxed (TY_IDX tyi) { Clear_TY_is_relaxed(Ty_Table[tyi]); } 01264 01265 inline BOOL 01266 TY_is_written (const TY& ty) { return ty.flags & TY_IS_WRITTEN; } 01267 inline void 01268 Set_TY_is_written (TY& ty) { ty.flags |= TY_IS_WRITTEN; } 01269 inline void 01270 Clear_TY_is_written (TY& ty) { ty.flags &= ~TY_IS_WRITTEN; } 01271 inline BOOL 01272 TY_is_written (const TY_IDX tyi) { return TY_is_written(Ty_Table[tyi]); } 01273 inline void 01274 Set_TY_is_written (TY_IDX tyi) { Set_TY_is_written(Ty_Table[tyi]); } 01275 inline void 01276 Clear_TY_is_written (TY_IDX tyi) { Clear_TY_is_written(Ty_Table[tyi]); } 01277 01278 //------------------------------------------------------------------------------ 01279 // UPC specific functions end 01280 //------------------------------------------------------------------------------ 01281 01282 01283 inline BOOL 01284 TY_ptr_as_array (const TY& ty) { return ty.flags & TY_PTR_AS_ARRAY; } 01285 inline void 01286 Set_TY_ptr_as_array (TY& ty) { ty.flags |= TY_PTR_AS_ARRAY; } 01287 inline void 01288 Clear_TY_ptr_as_array (TY& ty) { ty.flags &= ~TY_PTR_AS_ARRAY; } 01289 inline BOOL 01290 TY_ptr_as_array (const TY_IDX tyi) { return TY_ptr_as_array(Ty_Table[tyi]); } 01291 inline void 01292 Set_TY_ptr_as_array (TY_IDX tyi) { Set_TY_ptr_as_array(Ty_Table[tyi]); } 01293 inline void 01294 Clear_TY_ptr_as_array (TY_IDX tyi) { Clear_TY_ptr_as_array(Ty_Table[tyi]); } 01295 01296 inline BOOL 01297 TY_anonymous (const TY& ty) { return ty.flags & TY_ANONYMOUS; } 01298 inline void 01299 Set_TY_anonymous (TY& ty) { ty.flags |= TY_ANONYMOUS; } 01300 inline void 01301 Clear_TY_anonymous (TY& ty) { ty.flags &= ~TY_ANONYMOUS; } 01302 inline BOOL 01303 TY_anonymous (const TY_IDX tyi) { return TY_anonymous(Ty_Table[tyi]); } 01304 inline void 01305 Set_TY_anonymous (TY_IDX tyi) { Set_TY_anonymous(Ty_Table[tyi]); } 01306 inline void 01307 Clear_TY_anonymous (TY_IDX tyi) { Clear_TY_anonymous(Ty_Table[tyi]); } 01308 01309 inline BOOL 01310 TY_split (const TY& ty) { return ty.flags & TY_SPLIT; } 01311 inline void 01312 Set_TY_split (TY& ty) { ty.flags |= TY_SPLIT; } 01313 inline void 01314 Clear_TY_split (TY& ty) { ty.flags &= ~TY_SPLIT; } 01315 inline BOOL 01316 TY_split (const TY_IDX tyi) { return TY_split(Ty_Table[tyi]); } 01317 inline void 01318 Set_TY_split (TY_IDX tyi) { Set_TY_split(Ty_Table[tyi]); } 01319 inline void 01320 Clear_TY_split (TY_IDX tyi) { Clear_TY_split(Ty_Table[tyi]); } 01321 01322 inline BOOL 01323 TY_is_f90_pointer (const TY& ty) { return ty.flags & TY_IS_F90_POINTER; } 01324 inline void 01325 Set_TY_is_f90_pointer (TY& ty) { ty.flags |= TY_IS_F90_POINTER; } 01326 inline void 01327 Clear_TY_is_f90_pointer (TY& ty) { ty.flags &= ~TY_IS_F90_POINTER; } 01328 inline BOOL 01329 TY_is_f90_pointer (const TY_IDX tyi){ return TY_is_f90_pointer(Ty_Table[tyi]);} 01330 inline void 01331 Set_TY_is_f90_pointer (TY_IDX tyi) { Set_TY_is_f90_pointer(Ty_Table[tyi]); } 01332 inline void 01333 Clear_TY_is_f90_pointer (TY_IDX tyi){ Clear_TY_is_f90_pointer(Ty_Table[tyi]); } 01334 01335 inline BOOL 01336 TY_is_f90_assumed_size(const TY& ty) { return ty.flags & TY_IS_F90_ASSUMED_SIZE; } 01337 inline void 01338 Set_TY_is_f90_assumed_size(TY& ty) { ty.flags |= TY_IS_F90_ASSUMED_SIZE; } 01339 inline void 01340 Clear_TY_is_f90_assumed_size(TY& ty) { ty.flags &= ~TY_IS_F90_ASSUMED_SIZE; } 01341 inline BOOL 01342 TY_is_f90_assumed_size(const TY_IDX tyi){ return TY_is_f90_assumed_size(Ty_Table[tyi]);} 01343 inline void 01344 Set_TY_is_f90_assumed_size(TY_IDX tyi) { Set_TY_is_f90_assumed_size(Ty_Table[tyi]); } 01345 inline void 01346 Clear_TY_is_f90_assumed_size(TY_IDX tyi){ Clear_TY_is_f90_assumed_size(Ty_Table[tyi]);} 01347 01348 inline BOOL 01349 TY_is_f90_assumed_shape(const TY& ty) { return ty.flags & TY_IS_F90_ASSUMED_SHAPE; } 01350 inline void 01351 Set_TY_is_f90_assumed_shape(TY& ty) { ty.flags |= TY_IS_F90_ASSUMED_SHAPE; } 01352 inline void 01353 Clear_TY_is_f90_assumed_shape(TY& ty) { ty.flags &= ~TY_IS_F90_ASSUMED_SHAPE; } 01354 inline BOOL 01355 TY_is_f90_assumed_shape(const TY_IDX tyi){ return TY_is_f90_assumed_shape(Ty_Table[tyi]);} 01356 inline void 01357 Set_TY_is_f90_assumed_shape(TY_IDX tyi) { Set_TY_is_f90_assumed_shape(Ty_Table[tyi]); } 01358 inline void 01359 Clear_TY_is_f90_assumed_shape(TY_IDX tyi){ Clear_TY_is_f90_assumed_shape(Ty_Table[tyi]);} 01360 01361 01362 inline BOOL 01363 TY_is_f90_deferred_shape(const TY& ty) { return ty.flags & TY_IS_F90_DEFERRED_SHAPE; } 01364 inline void 01365 Set_TY_is_f90_deferred_shape(TY& ty) { ty.flags |= TY_IS_F90_DEFERRED_SHAPE; } 01366 inline void 01367 Clear_TY_is_f90_deferred_shape(TY& ty) { ty.flags &= ~TY_IS_F90_DEFERRED_SHAPE; } 01368 inline BOOL 01369 TY_is_f90_deferred_shape(const TY_IDX tyi){ return TY_is_f90_deferred_shape(Ty_Table[tyi]);} 01370 inline void 01371 Set_TY_is_f90_deferred_shape(TY_IDX tyi) { Set_TY_is_f90_deferred_shape(Ty_Table[tyi]); } 01372 inline void 01373 Clear_TY_is_f90_deferred_shape(TY_IDX tyi){ Clear_TY_is_f90_deferred_shape(Ty_Table[tyi]);} 01374 01375 inline BOOL 01376 TY_is_co_array(const TY& ty) { return ty.flags & TY_IS_CO_ARRAY;} 01377 inline void 01378 Set_TY_is_co_array(TY& ty) { ty.flags |= TY_IS_CO_ARRAY; } 01379 inline void 01380 Clear_TY_is_co_array(TY& ty) { ty.flags &= ~TY_IS_CO_ARRAY; } 01381 inline BOOL 01382 TY_is_co_array(const TY_IDX tyi){ return TY_is_co_array(Ty_Table[tyi]);} 01383 inline void 01384 Set_TY_is_co_array(TY_IDX tyi) { Set_TY_is_co_array(Ty_Table[tyi]); } 01385 inline void 01386 Clear_TY_is_co_array(TY_IDX tyi){ Clear_TY_is_co_array(Ty_Table[tyi]);} 01387 01388 01389 inline BOOL 01390 TY_is_external(const TY& ty) { return ty.flags & TY_IS_EXTERNAL; } 01391 inline void 01392 Set_TY_is_external(TY& ty) { ty.flags |= TY_IS_EXTERNAL; } 01393 inline void 01394 Clear_TY_is_external(TY& ty) { ty.flags &= ~TY_IS_EXTERNAL; } 01395 inline BOOL 01396 TY_is_external(const TY_IDX tyi){ return TY_is_external(Ty_Table[tyi]);} 01397 inline void 01398 Set_TY_is_external(TY_IDX tyi) { Set_TY_is_external(Ty_Table[tyi]); } 01399 inline void 01400 Clear_TY_is_external(TY_IDX tyi){ Clear_TY_is_external(Ty_Table[tyi]);} 01401 01402 01403 inline BOOL 01404 TY_not_in_union (const TY& ty) { return ty.flags & TY_NOT_IN_UNION; } 01405 inline void 01406 Set_TY_not_in_union (TY& ty) { ty.flags |= TY_NOT_IN_UNION; } 01407 inline void 01408 Clear_TY_not_in_union (TY& ty) { ty.flags &= ~TY_NOT_IN_UNION; } 01409 inline BOOL 01410 TY_not_in_union (const TY_IDX tyi) { return TY_not_in_union(Ty_Table[tyi]); } 01411 inline void 01412 Set_TY_not_in_union (TY_IDX tyi) { Set_TY_not_in_union(Ty_Table[tyi]); } 01413 inline void 01414 Clear_TY_not_in_union (TY_IDX tyi) { Clear_TY_not_in_union(Ty_Table[tyi]); } 01415 01416 inline BOOL 01417 TY_no_ansi_alias (const TY& ty) { return ty.flags & TY_NO_ANSI_ALIAS; } 01418 inline void 01419 Set_TY_no_ansi_alias (TY& ty) { ty.flags |= TY_NO_ANSI_ALIAS; } 01420 inline void 01421 Clear_TY_no_ansi_alias (TY& ty) { ty.flags &= ~TY_NO_ANSI_ALIAS; } 01422 inline BOOL 01423 TY_no_ansi_alias (const TY_IDX tyi) { return TY_no_ansi_alias(Ty_Table[tyi]); } 01424 inline void 01425 Set_TY_no_ansi_alias (TY_IDX tyi) { Set_TY_no_ansi_alias(Ty_Table[tyi]); } 01426 inline void 01427 Clear_TY_no_ansi_alias (TY_IDX tyi) { Clear_TY_no_ansi_alias(Ty_Table[tyi]); } 01428 01429 inline BOOL 01430 TY_is_non_pod (const TY& ty) { return ty.flags & TY_IS_NON_POD; } 01431 inline void 01432 Set_TY_is_non_pod (TY& ty) { ty.flags |= TY_IS_NON_POD; } 01433 inline void 01434 Clear_TY_is_non_pod (TY& ty) { ty.flags &= ~TY_IS_NON_POD; } 01435 inline BOOL 01436 TY_is_non_pod (const TY_IDX tyi) { return TY_is_non_pod(Ty_Table[tyi]); } 01437 inline void 01438 Set_TY_is_non_pod (TY_IDX tyi) { Set_TY_is_non_pod(Ty_Table[tyi]); } 01439 inline void 01440 Clear_TY_is_non_pod (TY_IDX tyi) { Clear_TY_is_non_pod(Ty_Table[tyi]); } 01441 01442 inline BOOL 01443 TY_return_in_mem (const TY& ty) { return ty.flags & TY_RETURN_IN_MEM; } 01444 inline void 01445 Set_TY_return_in_mem (TY& ty) { ty.flags |= TY_RETURN_IN_MEM; } 01446 inline void 01447 Clear_TY_return_in_mem (TY& ty) { ty.flags &= ~TY_RETURN_IN_MEM; } 01448 inline BOOL 01449 TY_return_in_mem (const TY_IDX tyi) { return TY_return_in_mem(Ty_Table[tyi]); } 01450 inline void 01451 Set_TY_return_in_mem (TY_IDX tyi) { Set_TY_return_in_mem(Ty_Table[tyi]); } 01452 inline void 01453 Clear_TY_return_in_mem (TY_IDX tyi) { Clear_TY_return_in_mem(Ty_Table[tyi]); } 01454 01455 // TY pu_flags 01456 01457 inline BOOL 01458 TY_return_to_param (const TY& ty) { return ty.Pu_flags () & TY_RETURN_TO_PARAM; } 01459 inline void 01460 Set_TY_return_to_param (TY& ty) { ty.Set_pu_flag (TY_RETURN_TO_PARAM); } 01461 inline void 01462 Clear_TY_return_to_param (TY& ty) { ty.Clear_pu_flag (TY_RETURN_TO_PARAM); } 01463 inline BOOL 01464 TY_return_to_param (const TY_IDX tyi) { 01465 return TY_return_to_param(Ty_Table[tyi]); 01466 } 01467 inline void 01468 Set_TY_return_to_param (TY_IDX tyi) { Set_TY_return_to_param(Ty_Table[tyi]); } 01469 inline void 01470 Clear_TY_return_to_param (TY_IDX tyi){ 01471 Clear_TY_return_to_param(Ty_Table[tyi]); 01472 } 01473 01474 inline BOOL 01475 TY_is_varargs (const TY& ty) { return ty.Pu_flags () & TY_IS_VARARGS; } 01476 inline void 01477 Set_TY_is_varargs (TY& ty) { ty.Set_pu_flag (TY_IS_VARARGS); } 01478 inline void 01479 Clear_TY_is_varargs (TY& ty) { ty.Clear_pu_flag (TY_IS_VARARGS); } 01480 inline BOOL 01481 TY_is_varargs (const TY_IDX tyi) { return TY_is_varargs(Ty_Table[tyi]); } 01482 inline void 01483 Set_TY_is_varargs (TY_IDX tyi) { Set_TY_is_varargs(Ty_Table[tyi]); } 01484 inline void 01485 Clear_TY_is_varargs (TY_IDX tyi) { Clear_TY_is_varargs(Ty_Table[tyi]); } 01486 01487 inline BOOL 01488 TY_has_prototype (const TY_IDX tyi) { 01489 return Ty_Table[tyi].Pu_flags() & TY_HAS_PROTOTYPE; 01490 } 01491 inline void 01492 Set_TY_has_prototype (TY_IDX tyi) { 01493 Ty_Table[tyi].Set_pu_flag (TY_HAS_PROTOTYPE); 01494 } 01495 inline void 01496 Clear_TY_has_prototype (TY_IDX tyi) { 01497 Ty_Table[tyi].Clear_pu_flag (TY_HAS_PROTOTYPE); 01498 } 01499 01500 01501 //---------------------------------------------------------------------- 01502 // access functions for FLD 01503 //---------------------------------------------------------------------- 01504 01505 inline STR_IDX 01506 FLD_name_idx (FLD_HANDLE fld) { return fld.Entry()->name_idx; } 01507 inline void 01508 Set_FLD_name_idx (FLD_HANDLE fld, STR_IDX idx){ fld.Entry()->name_idx = idx; } 01509 inline char * 01510 FLD_name (FLD_HANDLE fld) { return &Str_Table[fld.Entry()->name_idx]; } 01511 01512 inline TY_IDX 01513 #if 0 01514 FLD_type (FLD_HANDLE fld) { return fld.Entry()->type; } 01515 #endif 01516 FLD_type (FLD_HANDLE fld) 01517 { 01518 if (TY_is_f90_pointer(fld.Entry()->type)) 01519 return TY_pointed(fld.Entry()->type); 01520 else 01521 return fld.Entry()->type; } 01522 01523 inline void 01524 Set_FLD_type (FLD_HANDLE fld, TY_IDX ty){ fld.Entry()->type = ty; } 01525 01526 inline UINT64 01527 FLD_ofst (FLD_HANDLE fld) { return fld.Entry()->ofst; } 01528 inline void 01529 Set_FLD_ofst (FLD_HANDLE fld, UINT64 ofst) { fld.Entry()->ofst = ofst; } 01530 01531 inline UINT8 01532 FLD_bsize (FLD_HANDLE fld) { return fld.Entry()->bsize; } 01533 inline void 01534 Set_FLD_bsize (FLD_HANDLE fld, UINT8 bsize) { fld.Entry()->bsize = bsize; } 01535 01536 inline UINT8 01537 FLD_bofst (FLD_HANDLE fld) { return fld.Entry()->bofst; } 01538 inline void 01539 Set_FLD_bofst (FLD_HANDLE fld, UINT8 bofst) { fld.Entry()->bofst = bofst; } 01540 01541 inline UINT16 01542 FLD_flags (FLD_HANDLE fld) { return fld.Entry()->flags; } 01543 inline void 01544 Set_FLD_flags (FLD_HANDLE fld, UINT16 flags) { fld.Entry()->flags = flags; } 01545 01546 inline ST_IDX 01547 FLD_st (FLD_HANDLE fld) { return fld.Entry()->st; } 01548 inline void 01549 Set_FLD_st (FLD_HANDLE fld, ST_IDX st) { fld.Entry()->st = st; } 01550 01551 //---------------------------------------------------------------------- 01552 // FLD flags 01553 //---------------------------------------------------------------------- 01554 01555 inline BOOL 01556 FLD_last_field (FLD_HANDLE fld) { return fld.Entry()->flags & FLD_LAST_FIELD; } 01557 inline void 01558 Set_FLD_last_field (FLD_HANDLE fld) { fld.Entry()->flags |= FLD_LAST_FIELD; } 01559 inline void 01560 Clear_FLD_last_field (FLD_HANDLE fld) { fld.Entry()->flags &= ~FLD_LAST_FIELD; } 01561 01562 inline BOOL 01563 FLD_equivalence (FLD_HANDLE fld) { return fld.Entry()->flags & FLD_EQUIVALENCE; } 01564 inline void 01565 Set_FLD_equivalence (FLD_HANDLE fld) { fld.Entry()->flags |= FLD_EQUIVALENCE; } 01566 inline void 01567 Clear_FLD_equivalence (FLD_HANDLE fld) { fld.Entry()->flags &= ~FLD_EQUIVALENCE; } 01568 01569 inline BOOL 01570 FLD_is_pointer (FLD_HANDLE fld) { return fld.Entry()->flags & FLD_IS_POINTER; } 01571 inline void 01572 Set_FLD_is_pointer (FLD_HANDLE fld) { fld.Entry()->flags |= FLD_IS_POINTER; } 01573 inline void 01574 Clear_FLD_is_pointer (FLD_HANDLE fld) { fld.Entry()->flags &= ~FLD_IS_POINTER; } 01575 01576 01577 inline BOOL 01578 FLD_begin_union (FLD_HANDLE fld) { return fld.Entry()->flags & FLD_BEGIN_UNION; } 01579 inline void 01580 Set_FLD_begin_union (FLD_HANDLE fld) { fld.Entry()->flags |= FLD_BEGIN_UNION; } 01581 inline void 01582 Clear_FLD_begin_union (FLD_HANDLE fld) { fld.Entry()->flags &= ~FLD_BEGIN_UNION; } 01583 01584 inline BOOL 01585 FLD_end_union (FLD_HANDLE fld) { return fld.Entry()->flags & FLD_END_UNION; } 01586 inline void 01587 Set_FLD_end_union (FLD_HANDLE fld) { fld.Entry()->flags |= FLD_END_UNION; } 01588 inline void 01589 Clear_FLD_end_union (FLD_HANDLE fld) { fld.Entry()->flags &= ~FLD_END_UNION; } 01590 01591 inline BOOL 01592 FLD_begin_map (FLD_HANDLE fld) { return fld.Entry()->flags & FLD_BEGIN_MAP; } 01593 inline void 01594 Set_FLD_begin_map (FLD_HANDLE fld) { fld.Entry()->flags |= FLD_BEGIN_MAP; } 01595 inline void 01596 Clear_FLD_begin_map (FLD_HANDLE fld) { fld.Entry()->flags &= ~FLD_BEGIN_MAP; } 01597 01598 inline BOOL 01599 FLD_end_map (FLD_HANDLE fld) { return fld.Entry()->flags & FLD_END_MAP; } 01600 inline void 01601 Set_FLD_end_map (FLD_HANDLE fld) { fld.Entry()->flags |= FLD_END_MAP; } 01602 inline void 01603 Clear_FLD_end_map (FLD_HANDLE fld) { fld.Entry()->flags &= ~FLD_END_MAP; } 01604 01605 inline BOOL 01606 FLD_is_bit_field (FLD_HANDLE fld) { return fld.Entry()->flags & FLD_IS_BIT_FIELD; } 01607 inline void 01608 Set_FLD_is_bit_field (FLD_HANDLE fld) { fld.Entry()->flags |= FLD_IS_BIT_FIELD; } 01609 inline void 01610 Clear_FLD_is_bit_field (FLD_HANDLE fld) { fld.Entry()->flags &= ~FLD_IS_BIT_FIELD; } 01611 01612 //---------------------------------------------------------------------- 01613 // access functions for TYLIST 01614 //---------------------------------------------------------------------- 01615 01616 inline TY_IDX 01617 TYLIST_type (TYLIST tylist) { return tylist; } 01618 inline void 01619 Set_TYLIST_type (TYLIST& tylist, TY_IDX ty) { tylist = ty; } 01620 01621 01622 //---------------------------------------------------------------------- 01623 // access functions for ARB 01624 //---------------------------------------------------------------------- 01625 01626 inline UINT16 01627 ARB_flags (const ARB_HANDLE arb) { return arb.Entry()->flags; } 01628 inline void 01629 Set_ARB_flags (ARB_HANDLE arb, UINT16 flags){ arb.Entry()->flags = flags; } 01630 01631 inline UINT16 01632 ARB_dimension (const ARB_HANDLE arb) { return arb.Entry()->dimension; } 01633 inline void 01634 Set_ARB_dimension (ARB_HANDLE arb, UINT16 dim){ arb.Entry()->dimension = dim; } 01635 01636 // fzhao add for co_dimension 01637 inline UINT16 01638 ARB_co_dimension (const ARB_HANDLE arb) { return arb.Entry()->co_dimension; } 01639 inline void 01640 Set_ARB_co_dimension (ARB_HANDLE arb, UINT16 dim){ arb.Entry()->co_dimension = dim; } 01641 01642 01643 inline INT64 01644 ARB_lbnd_val (const ARB_HANDLE arb) { return arb.Entry()->Lbnd_val (); } 01645 inline void 01646 Set_ARB_lbnd_val (ARB_HANDLE arb, INT64 val) { arb.Entry()->Set_lbnd_val (val); } 01647 01648 inline ST_IDX 01649 ARB_lbnd_var (const ARB_HANDLE arb) { return arb.Entry()->Lbnd_var (); } 01650 inline void 01651 Set_ARB_lbnd_var (ARB_HANDLE arb, ST_IDX var) { arb.Entry()->Set_lbnd_var (var); } 01652 01653 inline INT64 01654 ARB_ubnd_val (const ARB_HANDLE arb) { return arb.Entry()->Ubnd_val (); } 01655 inline void 01656 Set_ARB_ubnd_val (ARB_HANDLE arb, INT64 val) { arb.Entry()->Set_ubnd_val (val); } 01657 01658 inline ST_IDX 01659 ARB_ubnd_var (const ARB_HANDLE arb) { return arb.Entry()->Ubnd_var (); } 01660 inline void 01661 Set_ARB_ubnd_var (ARB_HANDLE arb, ST_IDX var) { arb.Entry()->Set_ubnd_var (var); } 01662 01663 inline INT64 01664 ARB_stride_val (const ARB_HANDLE arb) { return arb.Entry()->Stride_val (); } 01665 inline void 01666 Set_ARB_stride_val (ARB_HANDLE arb, INT64 val){ arb.Entry()->Set_stride_val (val); } 01667 01668 inline ST_IDX 01669 ARB_stride_var (const ARB_HANDLE arb) { return arb.Entry()->Stride_var (); } 01670 inline void 01671 Set_ARB_stride_var (ARB_HANDLE arb, ST_IDX var) { arb.Entry()->Set_stride_var (var); } 01672 01673 //---------------------------------------------------------------------- 01674 // ARB flags 01675 //---------------------------------------------------------------------- 01676 01677 inline BOOL 01678 ARB_const_lbnd (const ARB_HANDLE arb) { return arb.Entry()->flags & ARB_CONST_LBND; } 01679 inline void 01680 Set_ARB_const_lbnd (ARB_HANDLE arb) { arb.Entry()->flags |= ARB_CONST_LBND; } 01681 inline void 01682 Clear_ARB_const_lbnd (ARB_HANDLE arb) { arb.Entry()->flags &= ~ARB_CONST_LBND; } 01683 01684 inline BOOL 01685 ARB_const_ubnd (const ARB_HANDLE arb) { return arb.Entry()->flags & ARB_CONST_UBND; } 01686 inline void 01687 Set_ARB_const_ubnd (ARB_HANDLE arb) { arb.Entry()->flags |= ARB_CONST_UBND; } 01688 inline void 01689 Clear_ARB_const_ubnd (ARB_HANDLE arb) { arb.Entry()->flags &= ~ARB_CONST_UBND; } 01690 01691 inline BOOL 01692 ARB_const_stride (const ARB_HANDLE arb) { return arb.Entry()->flags & ARB_CONST_STRIDE; } 01693 inline void 01694 Set_ARB_const_stride (ARB_HANDLE arb) { arb.Entry()->flags |= ARB_CONST_STRIDE; } 01695 inline void 01696 Clear_ARB_const_stride (ARB_HANDLE arb) { arb.Entry()->flags &= ~ARB_CONST_STRIDE; } 01697 01698 01699 inline BOOL 01700 ARB_empty_lbnd (const ARB_HANDLE arb) { return arb.Entry()->flags & ARB_EMPTY_LBND; } 01701 inline void 01702 Set_ARB_empty_lbnd (ARB_HANDLE arb) { arb.Entry()->flags |= ARB_EMPTY_LBND; } 01703 inline void 01704 Clear_ARB_empty_lbnd (ARB_HANDLE arb) { arb.Entry()->flags &= ~ARB_EMPTY_LBND; } 01705 01706 01707 inline BOOL 01708 ARB_empty_ubnd (const ARB_HANDLE arb) { return arb.Entry()->flags & ARB_EMPTY_UBND; } 01709 inline void 01710 Set_ARB_empty_ubnd (ARB_HANDLE arb) { arb.Entry()->flags |= ARB_EMPTY_UBND; } 01711 inline void 01712 Clear_ARB_empty_ubnd (ARB_HANDLE arb) { arb.Entry()->flags &= ~ARB_EMPTY_UBND; } 01713 01714 01715 inline BOOL 01716 ARB_star_ubnd (const ARB_HANDLE arb) { return arb.Entry()->flags & ARB_STAR_UBND; } 01717 inline void 01718 Set_ARB_star_ubnd (ARB_HANDLE arb) { arb.Entry()->flags |= ARB_STAR_UBND; } 01719 inline void 01720 Clear_ARB_star_ubnd (ARB_HANDLE arb) { arb.Entry()->flags &= ~ARB_STAR_UBND; } 01721 01722 inline BOOL 01723 ARB_empty_stride (const ARB_HANDLE arb) { return arb.Entry()->flags & ARB_EMPTY_STRIDE; } 01724 inline void 01725 Set_ARB_empty_stride (ARB_HANDLE arb) { arb.Entry()->flags |= ARB_EMPTY_STRIDE; } 01726 inline void 01727 Clear_ARB_empty_stride (ARB_HANDLE arb) { arb.Entry()->flags &= ~ARB_EMPTY_STRIDE; } 01728 01729 01730 // March 01731 01732 01733 inline BOOL 01734 ARB_first_dimen (const ARB_HANDLE arb) { return arb.Entry()->flags & ARB_FIRST_DIMEN; } 01735 inline void 01736 Set_ARB_first_dimen (ARB_HANDLE arb) { arb.Entry()->flags |= ARB_FIRST_DIMEN; } 01737 inline void 01738 Clear_ARB_first_dimen (ARB_HANDLE arb) { arb.Entry()->flags &= ~ARB_FIRST_DIMEN; } 01739 01740 inline BOOL 01741 ARB_last_dimen (const ARB_HANDLE arb) { return arb.Entry()->flags & ARB_LAST_DIMEN; } 01742 inline void 01743 Set_ARB_last_dimen (ARB_HANDLE arb) { arb.Entry()->flags |= ARB_LAST_DIMEN; } 01744 inline void 01745 Clear_ARB_last_dimen (ARB_HANDLE arb) { arb.Entry()->flags &= ~ARB_LAST_DIMEN; } 01746 01747 01748 //---------------------------------------------------------------------- 01749 // access functions for LABEL 01750 //---------------------------------------------------------------------- 01751 01752 inline STR_IDX 01753 LABEL_name_idx (const LABEL& lbl) { return lbl.name_idx; } 01754 inline void 01755 Set_LABEL_name_idx (LABEL& lbl, STR_IDX s) { lbl.name_idx = s; } 01756 inline char * 01757 LABEL_name (const LABEL& lbl) { return &Str_Table[lbl.name_idx]; } 01758 01759 inline LABEL_KIND 01760 LABEL_kind (const LABEL& lbl) { return lbl.kind; } 01761 inline void 01762 Set_LABEL_KIND (LABEL& lbl, LABEL_KIND k) { lbl.kind = k; } 01763 01764 inline BOOL 01765 LABEL_target_of_goto_outer_block (const LABEL& l) 01766 { return l.flags & LABEL_TARGET_OF_GOTO_OUTER_BLOCK;} 01767 inline void 01768 Set_LABEL_target_of_goto_outer_block (LABEL& l) 01769 { l.flags |= LABEL_TARGET_OF_GOTO_OUTER_BLOCK; } 01770 inline void 01771 Clear_LABEL_target_of_goto_outer_block (LABEL& l) 01772 { l.flags &= ~LABEL_TARGET_OF_GOTO_OUTER_BLOCK; } 01773 01774 inline BOOL 01775 LABEL_addr_saved (const LABEL& l) { return l.flags & LABEL_ADDR_SAVED;} 01776 inline void 01777 Set_LABEL_addr_saved (LABEL& l) { l.flags |= LABEL_ADDR_SAVED; } 01778 inline void 01779 Clear_LABEL_addr_saved (LABEL& l) { l.flags &= ~LABEL_ADDR_SAVED; } 01780 01781 inline BOOL 01782 LABEL_addr_passed (const LABEL& l) { return l.flags & LABEL_ADDR_PASSED;} 01783 inline void 01784 Set_LABEL_addr_passed (LABEL& l) { l.flags |= LABEL_ADDR_PASSED; } 01785 inline void 01786 Clear_LABEL_addr_passed (LABEL& l) { l.flags &= ~LABEL_ADDR_PASSED; } 01787 01788 01789 //---------------------------------------------------------------------- 01790 // access functions for PREG 01791 //---------------------------------------------------------------------- 01792 01793 01794 inline STR_IDX 01795 PREG_name_idx (const PREG& preg) { return preg.name_idx; } 01796 inline void 01797 Set_PREG_name_idx (PREG& preg, STR_IDX s) { preg.name_idx = s; } 01798 inline void 01799 Set_PREG_name (PREG &preg, const char *const name) 01800 { Set_PREG_name_idx(preg, Save_Str(name)); } 01801 inline char * 01802 PREG_name (const PREG& preg) { return &Str_Table[preg.name_idx]; } 01803 01804 01805 //---------------------------------------------------------------------- 01806 // access functions for ST_ATTR 01807 //---------------------------------------------------------------------- 01808 01809 01810 inline ST_IDX 01811 ST_ATTR_st_idx (const ST_ATTR& st_attr) { return st_attr.st_idx; } 01812 inline void 01813 Set_ST_ATTR_st_idx (ST_ATTR& st_attr, ST_IDX st) { st_attr.st_idx = st; } 01814 inline ST_ATTR_KIND 01815 ST_ATTR_kind (const ST_ATTR& st_attr) { return st_attr.kind; } 01816 inline PREG_NUM 01817 ST_ATTR_reg_id (const ST_ATTR& st_attr) 01818 { 01819 Is_True (st_attr.kind == ST_ATTR_DEDICATED_REGISTER, 01820 ("attribute is not for a dedicated register")); 01821 return st_attr.u.reg_id; 01822 } 01823 inline void 01824 Set_ST_ATTR_reg_id (ST_ATTR& st_attr, PREG_NUM id) 01825 { 01826 st_attr.kind = ST_ATTR_DEDICATED_REGISTER; 01827 st_attr.u.reg_id = id; 01828 } 01829 inline STR_IDX 01830 ST_ATTR_section_name (const ST_ATTR& st_attr) 01831 { 01832 Is_True (st_attr.kind == ST_ATTR_SECTION_NAME, 01833 ("attribute is not for a section name")); 01834 return st_attr.u.section_name; 01835 } 01836 inline void 01837 Set_ST_ATTR_section_name (ST_ATTR& st_attr, STR_IDX name) 01838 { 01839 st_attr.kind = ST_ATTR_SECTION_NAME; 01840 st_attr.u.section_name = name; 01841 } 01842 01843 //---------------------------------------------------------------------- 01844 // access functions for FILE_INFO 01845 //---------------------------------------------------------------------- 01846 01847 inline UINT8 01848 FILE_INFO_gp_group (const FILE_INFO& f) { return f.gp_group; } 01849 inline void 01850 Set_FILE_INFO_gp_group (FILE_INFO& f, mUINT8 grp) { f.gp_group = grp; } 01851 01852 inline BOOL 01853 FILE_INFO_ipa (const FILE_INFO& f) { return f.flags & FI_IPA; } 01854 inline void 01855 Set_FILE_INFO_ipa (FILE_INFO& f) { f.flags |= FI_IPA; } 01856 inline void 01857 Clear_FILE_INFO_ipa (FILE_INFO& f) { f.flags &= ~FI_IPA; } 01858 01859 inline BOOL 01860 FILE_INFO_needs_lno (const FILE_INFO& f){ return f.flags & FI_NEEDS_LNO; } 01861 inline void 01862 Set_FILE_INFO_needs_lno (FILE_INFO& f) { f.flags |= FI_NEEDS_LNO; } 01863 inline void 01864 Clear_FILE_INFO_needs_lno (FILE_INFO& f){ f.flags &= ~FI_NEEDS_LNO; } 01865 01866 inline BOOL 01867 FILE_INFO_has_inlines (const FILE_INFO& f) { return f.flags & FI_HAS_INLINES; } 01868 inline void 01869 Set_FILE_INFO_has_inlines (FILE_INFO& f) { f.flags |= FI_HAS_INLINES; } 01870 inline void 01871 Clear_FILE_INFO_has_inlines (FILE_INFO& f) { f.flags &= ~FI_HAS_INLINES; } 01872 01873 inline BOOL 01874 FILE_INFO_has_mp (const FILE_INFO& f){ return f.flags & FI_HAS_MP; } 01875 inline void 01876 Set_FILE_INFO_has_mp (FILE_INFO& f) { f.flags |= FI_HAS_MP; } 01877 inline void 01878 Clear_FILE_INFO_has_mp (FILE_INFO& f){ f.flags &= ~FI_HAS_MP; } 01879 01880 01881 01882 //---------------------------------------------------------------------- 01883 // access functions for the TABLES 01884 //---------------------------------------------------------------------- 01885 01886 #if 0 01887 inline ST& 01888 SYMBOL_TABLE::operator[] (ST_IDX idx) 01889 { 01890 SYMTAB_IDX level = ST_IDX_level (idx); 01891 UINT32 index = ST_IDX_index (idx); 01892 return Scope_tab[level].st_tab->Entry (index); 01893 } 01894 01895 inline ST& 01896 SYMBOL_TABLE::operator() (SYMTAB_IDX level, UINT32 index) { 01897 Is_True (Scope_tab[level].st_tab != NULL, ("Uninitialized ST_TAB")); 01898 return Scope_tab[level].st_tab->Entry (index); 01899 } 01900 01901 01902 inline INITO& 01903 INITO_TABLE::operator[] (INITO_IDX idx) { 01904 SYMTAB_IDX level = INITO_IDX_level (idx); 01905 UINT32 index = INITO_IDX_index (idx); 01906 return Scope_tab[level].inito_tab->Entry (index); 01907 } 01908 01909 inline INITO& 01910 INITO_TABLE::operator() (SYMTAB_IDX level, UINT32 index) { 01911 Is_True (Scope_tab[level].inito_tab != NULL, ("Uninitialized INITO_TAB")); 01912 return Scope_tab[level].inito_tab->Entry (index); 01913 } 01914 #endif 01915 01916 inline LABEL& 01917 LABEL_TABLE::operator[] (LABEL_IDX idx) { 01918 return Scope_tab[CURRENT_SYMTAB].label_tab->Entry (idx); 01919 } 01920 01921 inline LABEL& 01922 LABEL_TABLE::operator() (SYMTAB_IDX level, LABEL_IDX idx) { 01923 return Scope_tab[level].label_tab->Entry (idx); 01924 } 01925 01926 inline PREG& 01927 PREG_TABLE::operator[] (PREG_IDX idx) { 01928 return Scope_tab[CURRENT_SYMTAB].preg_tab->Entry (idx); 01929 } 01930 01931 inline PREG& 01932 PREG_TABLE::operator() (SYMTAB_IDX level, PREG_IDX idx) { 01933 return Scope_tab[level].preg_tab->Entry (idx); 01934 } 01935 01936 inline ST_ATTR& 01937 ST_ATTR_TABLE::operator[] (ST_ATTR_IDX idx) { 01938 return Scope_tab[CURRENT_SYMTAB].st_attr_tab->Entry (idx); 01939 } 01940 01941 inline ST_ATTR& 01942 ST_ATTR_TABLE::operator() (SYMTAB_IDX level, ST_ATTR_IDX idx) { 01943 return Scope_tab[level].st_attr_tab->Entry (idx); 01944 } 01945 01946 inline TY& 01947 TYPE_TABLE::operator[] (TY_IDX idx) { 01948 return Ty_tab[TY_IDX_index(idx)]; 01949 } 01950 01951 inline TY_TAB* 01952 TYPE_TABLE::operator& () { 01953 return &Ty_tab; 01954 } 01955 01956 #endif // symtab_access_INCLUDED