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 00037 #ifdef USE_PCH 00038 #include "common_com_pch.h" 00039 #endif /* USE_PCH */ 00040 #pragma hdrstop 00041 00042 // 00043 // Symbol Table Verifiers; This file should be consistent with the 00044 // Whirl Symbol Table specification. 00045 // PLEASE DO NOT UPDATE this FILE w/o first checking with tk or wilson 00046 // 00047 00048 00049 #ifndef symtab_INCLUDED 00050 #include "symtab.h" // for Scope_tab 00051 #endif 00052 00053 // ====================================================================== 00054 // Auxiliary functions used by ST::Verify() 00055 // ====================================================================== 00056 // TCON: verifier 00057 // Can't define TCON::Verify as a member fn since TCON is still a "C" struct 00058 // See Table 24 00059 00060 static void 00061 TCON_Verify (TCON tc) { 00062 #ifdef Is_True_On 00063 switch ( TCON_ty (tc)) { 00064 case MTYPE_STRING: 00065 Is_True( Targ_String_Address (tc) != NULL, 00066 ("Invalid TCON string pointer")); 00067 break; 00068 default: 00069 break; 00070 } 00071 #endif // Is_True_On 00072 } // TCON_Verify 00073 00074 // ST_Verify_Class_Sclass verifies that the "symbol class" and "storage class" 00075 // of a symbol are mutually consistent. 00076 // (See table 6 in the Whirl Symbol Table Specification) 00077 // Also called for partial verification 00078 00079 void 00080 ST_Verify_Class_Sclass(ST_CLASS sym_class, ST_SCLASS storage_class) { 00081 static char msg[] = "Invalid storage class (%s) for %s"; 00082 switch (sym_class) { 00083 case CLASS_UNK: 00084 Is_True (storage_class == SCLASS_UNKNOWN, 00085 (msg, Sclass_Name (storage_class), Class_Name (sym_class))); 00086 break; 00087 case CLASS_VAR: 00088 switch (storage_class) { 00089 case SCLASS_AUTO: 00090 case SCLASS_FORMAL: 00091 case SCLASS_FORMAL_REF: 00092 case SCLASS_PSTATIC: 00093 case SCLASS_FSTATIC: 00094 case SCLASS_COMMON: 00095 case SCLASS_MODULE: 00096 case SCLASS_EXTERN: 00097 case SCLASS_UGLOBAL: 00098 case SCLASS_DGLOBAL: 00099 case SCLASS_CPLINIT: 00100 case SCLASS_EH_REGION: 00101 case SCLASS_EH_REGION_SUPP: 00102 case SCLASS_DISTR_ARRAY: 00103 case SCLASS_THREAD_PRIVATE_FUNCS: 00104 break; 00105 default: 00106 Fail_FmtAssertion (msg, Sclass_Name (storage_class), 00107 Class_Name (sym_class)); 00108 break; 00109 } 00110 break; 00111 case CLASS_FUNC: 00112 Is_True (storage_class == SCLASS_EXTERN || 00113 storage_class == SCLASS_TEXT, 00114 (msg, Sclass_Name (storage_class), Class_Name (sym_class))); 00115 break; 00116 case CLASS_CONST: 00117 Is_True (storage_class == SCLASS_FSTATIC || 00118 storage_class == SCLASS_EXTERN, 00119 (msg, Sclass_Name(storage_class), Class_Name(sym_class))); 00120 break; 00121 case CLASS_PREG: 00122 Is_True (storage_class == SCLASS_REG, 00123 (msg, Sclass_Name(storage_class), Class_Name(sym_class))); 00124 break; 00125 case CLASS_BLOCK: 00126 Is_True (storage_class != SCLASS_REG, 00127 (msg, Sclass_Name(storage_class), Class_Name(sym_class))); 00128 break; 00129 case CLASS_NAME: 00130 Is_True (storage_class == SCLASS_UNKNOWN || 00131 storage_class == SCLASS_COMMENT, 00132 (msg, Sclass_Name(storage_class), Class_Name(sym_class))); 00133 break; 00134 case CLASS_PARAMETER: 00135 Is_True (storage_class == SCLASS_PSTATIC || 00136 storage_class == SCLASS_FSTATIC || 00137 storage_class == SCLASS_EXTERN, 00138 (msg, Sclass_Name(storage_class), Class_Name(sym_class))); 00139 break; 00140 default: 00141 Fail_FmtAssertion (msg, Sclass_Name (storage_class), 00142 Class_Name (sym_class)); 00143 break; 00144 } 00145 } 00146 00147 // 00148 // ST_Verify_SClass_Export verifies that the "storage class" and "Export scope" 00149 // of a symbol are mutually consistent. 00150 // (See table 8 in the Whirl Symbol Table Specification) 00151 // Also called for partial verification 00152 00153 void 00154 ST_Verify_Sclass_Export (ST_SCLASS storage_class, ST_EXPORT export_class, 00155 const ST* st) 00156 { 00157 static char msg[] = "Invalid export scope (%s) for storage class (%s)"; 00158 switch (storage_class) { 00159 case SCLASS_UNKNOWN: 00160 case SCLASS_AUTO: 00161 case SCLASS_FORMAL: 00162 case SCLASS_FORMAL_REF: 00163 case SCLASS_PSTATIC: 00164 case SCLASS_FSTATIC: 00165 case SCLASS_CPLINIT: 00166 case SCLASS_EH_REGION: 00167 case SCLASS_EH_REGION_SUPP: 00168 case SCLASS_DISTR_ARRAY: 00169 case SCLASS_THREAD_PRIVATE_FUNCS: 00170 case SCLASS_COMMENT: 00171 Is_True (export_class == EXPORT_LOCAL || 00172 export_class == EXPORT_LOCAL_INTERNAL, 00173 (msg, Export_Name(export_class), Sclass_Name (storage_class))); 00174 break; 00175 case SCLASS_COMMON: 00176 case SCLASS_DGLOBAL: 00177 case SCLASS_MODULE: 00178 if (export_class == EXPORT_LOCAL || 00179 export_class == EXPORT_LOCAL_INTERNAL) { 00180 Is_True (st != NULL && ST_base_idx (st) != ST_st_idx (st) && 00181 ST_sclass (St_Table[ST_st_idx (st)]) == storage_class, 00182 (msg, Export_Name(export_class), 00183 Sclass_Name (storage_class))); 00184 break; 00185 } 00186 00187 // else, fall through 00188 00189 case SCLASS_EXTERN: 00190 case SCLASS_UGLOBAL: 00191 case SCLASS_TEXT: 00192 break; 00193 00194 case SCLASS_REG: 00195 Is_True (export_class == EXPORT_LOCAL || 00196 export_class == EXPORT_LOCAL_INTERNAL, 00197 (msg, Export_Name(export_class), Sclass_Name (storage_class))); 00198 break; 00199 default: 00200 Fail_FmtAssertion (msg, Export_Name (export_class), 00201 Sclass_Name (storage_class)); 00202 break; 00203 } 00204 } 00205 00206 // 00207 // ST_Verify_Flags verifies that the flags have been set only when they should 00208 // have been (See table 9 in the Whirl Symbol Table Specification) 00209 00210 static void 00211 ST_Verify_Flags (const ST &s) 00212 { 00213 static char msg[] = "Invalid %s (%s) for ST Flag: (%s)"; 00214 00215 if (ST_is_weak_symbol (s)) { 00216 Is_True(ST_export(s) != EXPORT_LOCAL && 00217 ST_export(s) != EXPORT_LOCAL_INTERNAL, 00218 (msg, "Export scope", Export_Name(ST_export(s)), "ST_WEAK_SYMBOL")); 00219 00220 if (ST_base_idx (s) != ST_st_idx (s)) 00221 Is_True (ST_sclass (s) == SCLASS_EXTERN || 00222 ST_sclass (s) == SCLASS_TEXT || 00223 ST_sclass (s) == SCLASS_DGLOBAL || 00224 ST_sclass (s) == SCLASS_UGLOBAL, 00225 (msg, "Storage class", Sclass_Name(ST_sclass(s)), 00226 "ST_WEAK_SYMBOL")); 00227 } 00228 00229 00230 if (ST_is_initialized (s)) { 00231 Is_True(ST_sym_class(s) == CLASS_VAR || ST_sym_class(s) == CLASS_CONST || 00232 ST_sym_class(s) == CLASS_BLOCK, 00233 (msg, "Class", Class_Name(ST_sym_class(s)), "ST_INITIALIZED")); 00234 00235 Is_True(ST_sclass(s) == SCLASS_PSTATIC || 00236 ST_sclass(s) == SCLASS_FSTATIC || 00237 ST_sclass(s) == SCLASS_EXTERN || 00238 ST_sclass(s) == SCLASS_DGLOBAL || 00239 ST_sclass(s) == SCLASS_UGLOBAL || 00240 ST_sclass(s) == SCLASS_CPLINIT || 00241 ST_sclass(s) == SCLASS_EH_REGION || 00242 ST_sclass(s) == SCLASS_EH_REGION_SUPP || 00243 ST_sclass(s) == SCLASS_DISTR_ARRAY || 00244 ST_sclass(s) == SCLASS_THREAD_PRIVATE_FUNCS || 00245 (ST_sclass(s) == SCLASS_UNKNOWN && ST_sym_class(s) == CLASS_BLOCK), 00246 (msg, "Storage class", Sclass_Name(ST_sclass(s)), "ST_INITIALIZED")); 00247 if (ST_sclass(s) == SCLASS_UGLOBAL) 00248 Is_True (ST_init_value_zero (s), 00249 (msg, "Storage class", Sclass_Name(ST_sclass(s)), 00250 "ST_INIT_VALUE_ZERO (must be set)")); 00251 } 00252 00253 // conversely ST_is_initialized better be set for SCLASS_DGLOBALS 00254 if (ST_sclass(s) == SCLASS_DGLOBAL) 00255 Is_True(ST_is_initialized (s), 00256 (msg,"Storage class", Sclass_Name(SCLASS_DGLOBAL), 00257 "ST_INITIALIZED (musr be set)")); 00258 00259 00260 if (ST_is_return_var (s)) 00261 Is_True(ST_sclass(s) == SCLASS_AUTO || 00262 ST_sclass(s) == SCLASS_PSTATIC || // -static 00263 ST_sclass(s) == SCLASS_FORMAL, // functions returning character* 00264 (msg, "Storage class", Sclass_Name(ST_sclass(s)), 00265 "ST_IS_RETURN_VAR")); 00266 00267 if (ST_is_value_parm (s)) 00268 Is_True (ST_sclass (s) == SCLASS_FORMAL || 00269 ST_sclass (s) == SCLASS_FORMAL_REF, 00270 (msg, "Storage class", Sclass_Name (ST_sclass (s)), 00271 "ST_IS_VALUE_PARM")); 00272 00273 if (ST_is_reshaped (s)) 00274 Is_True(ST_sym_class(s) == CLASS_VAR, 00275 (msg, "Class", Class_Name(ST_sym_class(s)), "ST_IS_RESHAPED")); 00276 00277 if (ST_emit_symbol (s)) 00278 Is_True(ST_sym_class(s) == CLASS_NAME || 00279 ST_sym_class(s) == CLASS_FUNC || 00280 ST_sym_class(s) == CLASS_VAR, 00281 (msg, "Class", Class_Name(ST_sym_class(s)), "ST_EMIT_SYMBOL")); 00282 00283 if (ST_has_nested_ref (s)) 00284 Is_True(ST_sclass(s) == SCLASS_AUTO || 00285 ST_sclass(s) == SCLASS_FORMAL || 00286 ST_sclass(s) == SCLASS_FORMAL_REF || 00287 ST_sclass(s) == SCLASS_PSTATIC, 00288 (msg, "Storage class", Sclass_Name(ST_sclass(s)), 00289 "ST_HAS_NESTED_REF")); 00290 00291 if (ST_init_value_zero (s)) { 00292 Is_True(ST_sym_class(s) == CLASS_VAR, 00293 (msg, "Class", Class_Name(ST_sym_class(s)), "ST_INIT_VALUE_ZERO")); 00294 00295 Is_True(ST_sclass(s) == SCLASS_EXTERN || 00296 ST_sclass(s) == SCLASS_UGLOBAL || 00297 ST_sclass(s) == SCLASS_FSTATIC || 00298 ST_sclass(s) == SCLASS_PSTATIC, 00299 (msg, "Storage class", Sclass_Name(ST_sclass(s)), 00300 "ST_INIT_VALUE_ZERO")); 00301 00302 Is_True(ST_is_initialized (s), 00303 (msg, "ST_IS_INITIALIZED", Class_Name(ST_sym_class(s)), 00304 "ST_INIT_VALUE_ZERO")); 00305 00306 } 00307 00308 if (ST_gprel (s) || ST_not_gprel (s)) { 00309 Is_True(ST_sym_class(s) == CLASS_VAR || 00310 ST_sym_class(s) == CLASS_CONST || 00311 ST_sym_class(s) == CLASS_BLOCK, 00312 (msg, "Class", Class_Name(ST_sym_class(s)), "ST_GPREL")); 00313 00314 Is_True(ST_sclass(s) != SCLASS_AUTO && 00315 ST_sclass(s) != SCLASS_FORMAL && 00316 ST_sclass(s) != SCLASS_FORMAL_REF, 00317 (msg, "Storage class", Sclass_Name(ST_sclass(s)), "ST_GPREL")); 00318 } 00319 00320 if (ST_is_namelist (s)) 00321 Is_True(ST_sym_class(s) == CLASS_VAR, 00322 (msg, "Class", Class_Name(ST_sym_class(s)), "ST_IS_NAMELIST")); 00323 00324 00325 if (ST_is_f90_target (s)) 00326 Is_True(ST_sym_class(s) == CLASS_VAR, 00327 (msg, "Class", Class_Name(ST_sym_class(s)), "ST_IS_F90_TARGET")); 00328 if (ST_is_my_pointer (s)) 00329 Is_True(ST_sym_class(s) == CLASS_VAR, 00330 (msg, "Class", Class_Name(ST_sym_class(s)), "ST_IS_POINTER")); 00331 00332 00333 00334 if (ST_declared_static (s)) 00335 Is_True(ST_sym_class(s) == CLASS_VAR, 00336 (msg, "Class", Class_Name(ST_sym_class(s)), "ST_DECLARED_STATIC")); 00337 00338 if (ST_is_equivalenced (s)) 00339 Is_True(ST_sym_class(s) == CLASS_VAR, 00340 (msg, "Class", Class_Name(ST_sym_class(s)), "ST_IS_EQUIVALENCED")); 00341 00342 if (ST_is_fill_align (s)) 00343 Is_True(ST_sym_class(s) == CLASS_VAR, 00344 (msg, "Class", Class_Name(ST_sym_class(s)), "ST_IS_FILL_ALIGN")); 00345 00346 if (ST_is_optional_argument (s)) 00347 Is_True(ST_sclass(s) == SCLASS_FORMAL_REF || 00348 ST_sclass(s) == SCLASS_FORMAL, 00349 (msg, "Storage class", Sclass_Name(ST_sclass(s)), 00350 "ST_IS_OPTIONAL_ARGUMENT")); 00351 00352 if (ST_is_temp_var (s)) 00353 Is_True(ST_sclass(s) == SCLASS_AUTO || 00354 ST_sclass(s) == SCLASS_FORMAL || 00355 ST_sclass(s) == SCLASS_FORMAL_REF, 00356 (msg, "Storage class", Sclass_Name(ST_sclass(s)), 00357 "ST_IS_TEMP_VAR")); 00358 00359 if (ST_is_const_var (s)) { 00360 Is_True(ST_sym_class(s) == CLASS_VAR, 00361 (msg, "Class", Class_Name(ST_sym_class(s)), "ST_IS_CONST_VAR")); 00362 00363 Is_True(ST_sclass(s) != SCLASS_AUTO && 00364 ST_sclass(s) != SCLASS_FORMAL && 00365 ST_sclass(s) != SCLASS_FORMAL_REF, 00366 (msg, "Storage class", Sclass_Name(ST_sclass(s)), 00367 "ST_IS_CONST_VAR")); 00368 } 00369 00370 if (ST_pt_to_unique_mem (s)) { 00371 Is_True (ST_sym_class (s) == CLASS_VAR, 00372 (msg, "Class", Class_Name(ST_sym_class(s)), 00373 "ST_PT_TO_UNIQUE_MEM")); 00374 } 00375 00376 if (ST_addr_saved (s)) 00377 Is_True(ST_sym_class(s) != CLASS_PREG, 00378 (msg, "Class", Class_Name(ST_sym_class(s)), "ST_ADDR_SAVED")); 00379 00380 if (ST_addr_passed (s)) 00381 Is_True(ST_sym_class(s) != CLASS_PREG, 00382 (msg, "Class", Class_Name(ST_sym_class(s)), "ST_ADDR_PASSED")); 00383 00384 if (ST_is_shared_auto (s)) { 00385 Is_True(ST_sym_class(s) == CLASS_VAR, 00386 (msg, "Class", Class_Name(ST_sym_class(s)), "ST_IS_SHARED_AUTO")); 00387 00388 Is_True(ST_sclass(s) == SCLASS_AUTO, 00389 (msg, "Storage class", Sclass_Name(ST_sclass(s)), 00390 "ST_IS_SHARED_AUTO")); 00391 } 00392 00393 Is_True (! (ST_is_weak_symbol (s) && 00394 ST_is_split_common (s)), 00395 (msg, "Flags", " ", "ST_is_split_common & ST_is_weak_symbol")); 00396 00397 } 00398 00399 // ====================================================================== 00400 // ST_Verify_Fields verifies an ST's fields: See table 3: Layout of ST 00401 // ====================================================================== 00402 static void 00403 ST_Verify_Fields(const ST &s) 00404 { 00405 00406 static char msg[] = "Invalid entry for ST Field: (%s)"; 00407 if ( ST_sym_class(s) == CLASS_CONST) { 00408 Is_True( 0 < ST_tcon(s) && ST_tcon(s) < TCON_Table_Size (), 00409 (msg, "tcon")); 00410 00411 // Verify the Tcon entry associated with this ST 00412 TCON_Verify(Tcon_Table[ST_tcon (s)]); 00413 } 00414 else { 00415 switch (ST_export (s)) { 00416 00417 default: 00418 Is_True (0 < ST_name_idx (s), (msg, "name_idx")); 00419 // fall through 00420 00421 case EXPORT_LOCAL: 00422 case EXPORT_LOCAL_INTERNAL: 00423 Is_True(ST_name_idx(s) < STR_Table_Size (), (msg, "name_idx")); 00424 break; 00425 } 00426 } 00427 00428 if (ST_level (&s) > GLOBAL_SYMTAB) 00429 Is_True (ST_export (s) == EXPORT_LOCAL || 00430 ST_export (s) == EXPORT_LOCAL_INTERNAL, 00431 (msg, "export")); 00432 00433 switch (ST_sym_class (s)) { 00434 case CLASS_FUNC: 00435 Is_True (ST_level (&s) == GLOBAL_SYMTAB, (msg, "sym_class")); 00436 Is_True( 0 < ST_pu(s) && ST_pu(s) < PU_Table_Size (), (msg, "pu")); 00437 00438 // Verify the PU associated with this st 00439 Pu_Table[ST_pu (s)].Verify (ST_level(&s)); 00440 break; 00441 case CLASS_BLOCK: 00442 if (ST_blk(s) == 0) 00443 DevWarn ("ST_blk == 0?"); 00444 else 00445 Is_True (ST_blk (s) > 0 && ST_blk (s) < Blk_Table.Size (), 00446 (msg, "name")); 00447 break; 00448 default: 00449 case CLASS_UNK: 00450 Fail_FmtAssertion (msg, Class_Name (ST_sym_class(s))); 00451 break; 00452 case CLASS_PREG: 00453 Is_True( ((&s == Return_Val_Preg) || (0 < TY_IDX_index (ST_type(s)) && 00454 TY_IDX_index (ST_type(s)) < TY_Table_Size ())), 00455 (msg, "type")); 00456 break; 00457 case CLASS_VAR: 00458 case CLASS_CONST: 00459 case CLASS_PARAMETER: 00460 Is_True( 0 < TY_IDX_index (ST_type(s)) && 00461 TY_IDX_index (ST_type(s)) < TY_Table_Size (), 00462 (msg, "type")); 00463 break; 00464 case CLASS_NAME: 00465 // CLASS_NAME is set only for C++ symbols related to template proc 00466 Is_True((ST_sclass(s) == SCLASS_UNKNOWN || 00467 ST_sclass(s) == SCLASS_COMMENT) && 00468 ST_export(s) == EXPORT_LOCAL, 00469 (msg,"sclass, export, base_idx")); 00470 00471 Is_True( 0 < ST_name_idx(s) && ST_name_idx(s) < STR_Table_Size (), 00472 (msg, "name")); 00473 break; 00474 } // switch ST_sym_class (s) 00475 00476 // EVERY ST should have base != 0 00477 00478 Is_True (ST_base_idx(s) != 0, (msg, "base_idx")); 00479 00480 if ( ST_base_idx(s) != ST_st_idx(s)) { 00481 // s is "based"; Let s be "based" on sb; ie s -> ... -> sb 00482 // where ST_base_idx(sb) == ST_st_idx(sb) 00483 // verify s's offset and size are in sync with sb 00484 00485 // This implies verifying following properties of s and sb; 00486 00487 INT64 ofst; 00488 ST *sb; 00489 ST *snon_const = (ST *) &s; 00490 // casting away const is bAAAAD, but can't change Base_Symbol_And_Offset 00491 00492 Base_Symbol_And_Offset ( snon_const, &sb, &ofst ); 00493 00494 // Property 1a. 00495 if ( ST_storage_class (*sb) != SCLASS_UNKNOWN) { 00496 00497 if ( !ST_is_weak_symbol (s) ) 00498 Is_True( ST_storage_class(s) == ST_storage_class(*sb), 00499 (msg,"storage class, should be identical as based blocks")); 00500 00501 } 00502 else { 00503 // Property 1b For blocks such as bss, SCLASS== UNKNOWN and EXPORT==LOCAL 00504 Is_True( ST_export(sb) == EXPORT_LOCAL && ST_class(sb) ==CLASS_BLOCK, 00505 (msg,"export scope, for based st with SCLASS_UNKNOWN should be EXPORT_LOCAL and class should be CLASS_BLOCK")); 00506 } 00507 00508 // Property 2: verify that ST_symclass of s and of sb are identical? 00509 if ( ST_sym_class (s) == CLASS_BLOCK) { 00510 Is_True( ST_sym_class (s) == ST_sym_class (sb), 00511 (msg, "storage_class")); 00512 } 00513 00514 // Property 3. 00515 if (!(ofst + ST_size (&s) <= ST_size (sb)) && (ST_class(sb) != CLASS_BLOCK || !STB_is_basereg(sb))) 00516 DevWarn("ofst + size of a ST (%s) should be less than size of its base (%s)", ST_name(s), ST_name(sb)); 00517 00518 } // Verification of properties of "based" sts 00519 else { 00520 // s is NOT based ie ST_base_idx(s) == ST_st_idx(s) 00521 Is_True(ST_ofst(s) == 0, 00522 ("offset: should be zero for st (%s) that is not based", ST_name(s))); 00523 } 00524 } // ST_Verify_Fields 00525 00526 // ====================================================================== 00527 // ST::Verify(): other st related checks go into this function 00528 // ====================================================================== 00529 // ST::Verify Calls: TCON_Verify, PU::Verify, TY::Verify 00530 void 00531 ST::Verify (UINT) const 00532 { 00533 #ifdef Is_True_On 00534 ST_Verify_Class_Sclass (sym_class, storage_class); 00535 ST_Verify_Sclass_Export (storage_class, export_class, this); 00536 ST_Verify_Flags(*this); 00537 ST_Verify_Fields(*this); 00538 #endif // Is_True_On 00539 } // ST::Verify 00540 00541 // ====================================================================== 00542 // INITO::Verify(): other INITO related checks go into this function 00543 // ====================================================================== 00544 // (See table 25 and 26 in the Whirl Symbol Table Specification) 00545 00546 void INITO::Verify(UINT level) const 00547 { 00548 #ifdef Is_True_On 00549 Is_True(ST_IDX_index (st_idx) > 0 && 00550 ST_IDX_index (st_idx) < ST_Table_Size (ST_IDX_level (st_idx)), 00551 ("Invalid st_idx for INITO")); 00552 Is_True(ST_is_initialized (St_Table[st_idx]), 00553 ("ST_IS_INITIALIZED not set")); 00554 Is_True(0 < val && val < INITV_Table_Size(), 00555 ("Invalid field for INITO: val")); 00556 Is_True(level == ST_IDX_level(st_idx), 00557 ("INITO/st_idx level mismatch")); 00558 #endif 00559 } 00560 00561 // ====================================================================== 00562 // INITV::Verify(): other INITV related checks go into this function 00563 // ====================================================================== 00564 // (See table 27 and 28 in the Whirl Symbol Table Specification) 00565 00566 void INITV::Verify(UINT) const 00567 { 00568 #ifdef Is_True_On 00569 static char msg[] = "Invalid entry for INITV Field: (%s)"; 00570 00571 switch (kind) { 00572 case INITVKIND_SYMOFF: 00573 Is_True ( repeat1 != 0, 00574 (msg, "repeat1: should not be 0")); 00575 break; 00576 case INITVKIND_ZERO: 00577 Is_True ( repeat1 == 0, 00578 (msg, "repeat1: should be 0")); 00579 Is_True ( Repeat2 () != 0, 00580 (msg, "repeat2: should be 0")); 00581 break; 00582 case INITVKIND_ONE: 00583 Is_True ( repeat1 == 0, 00584 (msg, "repeat1: should be 0")); 00585 Is_True ( Repeat2 () != 0, 00586 (msg, "repeat2: should be 1")); 00587 break; 00588 case INITVKIND_VAL: 00589 Is_True ( repeat1 == 0, 00590 (msg, "repeat1: should be 0")); 00591 break; 00592 case INITVKIND_BLOCK: 00593 Is_True ( Blk () != 0, (msg, "blk: should not be 0")); 00594 // fall through 00595 case INITVKIND_LABEL: 00596 case INITVKIND_PAD: 00597 Is_True (u.lab.unused == 0, 00598 (msg, "unused fillers for lab, blk, and pad must be zero")); 00599 // fall through 00600 case INITVKIND_SYMDIFF: 00601 case INITVKIND_SYMDIFF16: 00602 Is_True ( repeat1 != 0, 00603 (msg, "repeat1: should not be 0")); 00604 break; 00605 case INITVKIND_UNK: 00606 default: 00607 Fail_FmtAssertion (msg, "kind: unknown"); 00608 break; 00609 } 00610 #endif 00611 } 00612 00613 // ====================================================================== 00614 // FLD::Verify(): other FLD related checks go into this function 00615 // ====================================================================== 00616 // (See table 19 and 20 in the Whirl Symbol Table Specification) 00617 00618 void FLD::Verify (UINT64 record_size) const 00619 { 00620 #ifdef Is_True_On 00621 const int FLD_BIT_FIELD_SIZE = 64; 00622 const int FLD_BIT_OFFSET_SIZE = 64; 00623 static char msg[] = "Invalid entry for FLD Field: (%s)"; 00624 00625 Is_True (name_idx < STR_Table_Size (), (msg, "name_idx")); 00626 00627 Is_True (TY_IDX_index (type) < TY_Table_Size (), (msg, "type")); 00628 00629 Is_True (bsize <= FLD_BIT_FIELD_SIZE, (msg, "bsize")); 00630 00631 Is_True (bofst <= FLD_BIT_OFFSET_SIZE, (msg, "bofst")); 00632 00633 if (ofst > record_size) 00634 Fail_FmtAssertion (msg, "ofst"); 00635 00636 else if (ofst == record_size) { 00637 00638 if (flags & FLD_IS_BIT_FIELD) { 00639 00640 // Do not give error for structs of the form 00641 // 00642 // struct example { 00643 // unsigned int i:1; 00644 // unsigned int: 0; 00645 // } ex; 00646 00647 Is_True (bsize == 0, (msg, "ofst")); 00648 } else { 00649 // handle zero-size types, such as array of zero length 00650 Is_True (TY_size (type) == 0, (msg, "ofst")); 00651 } 00652 00653 } 00654 00655 if (! (flags & FLD_IS_BIT_FIELD)) { 00656 Is_True ( bsize == 0, (msg, "bsize")); 00657 Is_True ( bofst == 0, (msg, "bofst")); 00658 } 00659 00660 if (! (flags & FLD_EQUIVALENCE) && st) { 00661 Is_True (ST_IDX_level (st) == GLOBAL_SYMTAB, (msg, "st")); 00662 } 00663 00664 00665 #endif // Is_True_On 00666 } // FLD::Verify() 00667 00668 00669 static void 00670 FLD_Verify_all (FLD_HANDLE fld_handle, UINT64 record_size) 00671 { 00672 #ifdef Is_True_On 00673 FLD_ITER iter = Make_fld_iter (fld_handle); 00674 FLD_ITER last = Fld_Table.end (); 00675 00676 do { 00677 (*iter).Verify (record_size); 00678 } while (!FLD_last_field(iter) && ++iter != last); 00679 00680 Is_True (iter != last && FLD_last_field (iter), 00681 ("Missing last field in FLD")); 00682 #endif 00683 } // FLD_Verify_all 00684 00685 // ====================================================================== 00686 // ARB::Verify(): other ARB related checks go into this function 00687 // ====================================================================== 00688 // (See table 22 and 23 in the Whirl Symbol Table Specification) 00689 00690 void ARB::Verify (mUINT16 dim) const 00691 { 00692 #ifdef Is_True_On 00693 static char msg[] = "Invalid entry for ARB Field: (%s)"; 00694 00695 Is_True (dimension == dim, (msg, "invalid array dimension")); 00696 00697 Is_True (unused == 0, (msg, "Unused filler fields")); 00698 00699 if (!(flags & ARB_CONST_LBND) && Lbnd_var() != 0) { 00700 Is_True (u1.var.unused == 0, (msg, "Unused filler fields")); 00701 } 00702 00703 if ( ! (flags & ARB_CONST_UBND) && Ubnd_var() != 0) { 00704 Is_True( u2.var.unused == 0, (msg, "Unused filler fields")); 00705 } 00706 00707 if ( ! (flags & ARB_CONST_STRIDE) && Stride_var() != 0) { 00708 Is_True( u3.var.unused == 0, (msg, "Unused filler fields")); 00709 } 00710 00711 if (dim == 1) 00712 Is_True (flags & ARB_LAST_DIMEN, (msg, "missing ARB_LAST_DIMEN bit")); 00713 else 00714 Is_True (! (flags & ARB_LAST_DIMEN), 00715 (msg, "ARB_LAST_DIMEN bit inconsistent with dimension")); 00716 00717 #endif // Is_True_On 00718 } // ARB::Verify() 00719 00720 static void 00721 ARB_Verify_all (ARB_HANDLE arb) 00722 { 00723 #ifdef Is_True_On 00724 ARB_IDX last = ARB_Table_Size (); 00725 00726 Is_True (ARB_first_dimen (arb), ("Invalid ARB_IDX")); 00727 00728 mUINT16 dim = ARB_dimension (arb); 00729 Is_True((dim>=1),("Invalid ARB dimension")); 00730 Is_True((arb.Idx() + dim <= last),("Invalid ARB_dimension")); 00731 Is_True(ARB_first_dimen(arb),("Missing ARB_FIRST_DIMEN bit")); 00732 for (INT i=0; i < dim; i++) { 00733 arb[i].Entry()->Verify(dim-i); 00734 } 00735 #endif 00736 } // ARB_Verify_all 00737 00738 // ====================================================================== 00739 // LABEL::Verify(): other LABEL related checks go into this function 00740 // ====================================================================== 00741 // (See table 29 and 30 in the Whirl Symbol Table Specification) 00742 00743 void LABEL::Verify(UINT) const 00744 { 00745 #ifdef Is_True_On 00746 Is_True( LABEL_name_idx (*this) < STR_Table_Size (), 00747 ("Invalid LABEL name")); 00748 #endif // Is_True_On 00749 } // LABEL::Verify() 00750 00751 // ====================================================================== 00752 // PREG::Verify(): other preg related checks go into this function 00753 // ====================================================================== 00754 // (See table 31 in the Whirl Symbol Table Specification) 00755 00756 void PREG::Verify(UINT) const 00757 { 00758 #ifdef Is_True_On 00759 Is_True( PREG_name_idx (*this) < STR_Table_Size (), 00760 ("Invalid PREG name")); 00761 #endif // Is_True_On 00762 } // PREG::Verify() 00763 00764 00765 // ====================================================================== 00766 // ST_ATTR::Verify(): other st_attr related checks go into this function 00767 // ====================================================================== 00768 void 00769 ST_ATTR::Verify (UINT level) const 00770 { 00771 #ifdef Is_True_On 00772 Is_True(level == ST_IDX_level(st_idx), 00773 ("ST_ATTR/st_idx level mismatch")); 00774 Is_True(ST_IDX_index (st_idx) > 0 && 00775 ST_IDX_index (st_idx) < ST_Table_Size (ST_IDX_level (st_idx)), 00776 ("Invalid st_idx for ST_ATTR")); 00777 const ST& st = St_Table[st_idx]; 00778 switch (kind) { 00779 case ST_ATTR_UNKNOWN: 00780 break; 00781 case ST_ATTR_DEDICATED_REGISTER: 00782 Is_True(ST_assigned_to_dedicated_preg (st), 00783 ("ST_ASSIGNED_TO_DEDICATED_PREG not set")); 00784 Is_True(TY_is_volatile (ST_type (st)), 00785 ("dedicated registers must be marked volatile")); 00786 break; 00787 case ST_ATTR_SECTION_NAME: 00788 Is_True(u.section_name < STR_Table_Size (), ("Invalid section name")); 00789 break; 00790 default: 00791 Fail_FmtAssertion ("Unknown ST_ATTR kind"); 00792 break; 00793 } 00794 #endif 00795 } 00796 00797 // ====================================================================== 00798 // Auxiliary functions used by TY::Verify() 00799 // ====================================================================== 00800 // (See table 18 in the Whirl Symbol Table Specification) 00801 00802 void 00803 TY_Verify_Kind_Mtype (TY_KIND kind, mTYPE_ID mtype) 00804 { 00805 static char msg[] = "Invalid TY kind/mtype combination: %s"; 00806 00807 switch (kind) { 00808 case KIND_SCALAR: 00809 Is_True ( mtype != MTYPE_UNKNOWN && 00810 mtype != MTYPE_V && 00811 mtype != MTYPE_A4 && 00812 mtype != MTYPE_A8, 00813 (msg, "For KIND_SCALAR, mtype cannot be VOID/UNKNOWN")); 00814 break; 00815 case KIND_ARRAY: 00816 Is_True ( mtype == MTYPE_UNKNOWN || mtype == MTYPE_M, 00817 (msg, "For KIND_ARRAY, mtype must be UNKNOWN")); 00818 break; 00819 case KIND_STRUCT: 00820 Is_True ( mtype == MTYPE_M, 00821 (msg, "For KIND_STRUCT, mtype must be M")); 00822 break; 00823 case KIND_POINTER: 00824 { 00825 TYPE_ID a_type = (Pointer_Size == MTYPE_byte_size (MTYPE_A4)) ? 00826 MTYPE_A4 : MTYPE_A8; 00827 Is_True ( mtype == Pointer_Mtype || mtype == a_type, 00828 (msg, "For KIND_POINTER, mtype MUST be MTYPE_U4/U8/A4/A8")); 00829 } 00830 break; 00831 case KIND_FUNCTION: 00832 Is_True ( mtype == MTYPE_UNKNOWN, 00833 (msg, "For KIND_FUNCTION, mtype must be UNKNOWN")); 00834 break; 00835 case KIND_VOID: 00836 Is_True ( mtype == MTYPE_V, 00837 (msg, "For KIND_VOID, mtype must be VOID")); 00838 break; 00839 default: 00840 Fail_FmtAssertion (msg, "invalid KIND"); 00841 break; 00842 } 00843 } 00844 // ====================================================================== 00845 // TY::Verify(): other ty related checks go into this function 00846 // ====================================================================== 00847 // (See table 13, 14, 15, 16, and 17 in the Whirl Symbol Table Specification) 00848 // TY::Verify Calls : FLD::Verify (if TY_kind is KIND_STRUCT/CLASS) 00849 // also indirectly calls TY::Verify (if TY_kind is KIND_FUNCTION) 00850 00851 void TY::Verify(UINT) const 00852 { 00853 #ifdef Is_True_On 00854 static char msg[] = "Invalid TY entries: (%s)"; 00855 FLD_IDX Fld_index; 00856 TYLIST_IDX Tylist_index; 00857 UINT32 ty_idx; 00858 00859 TY_Verify_Kind_Mtype (kind, mtype); 00860 00861 Is_True (name_idx < STR_Table_Size (), (msg, "name_idx out of bound")); 00862 00863 switch (kind) { 00864 00865 default: 00866 Fail_FmtAssertion (msg, "Invalid kind"); 00867 break; 00868 00869 case KIND_STRUCT: 00870 Fld_index = Fld (); 00871 00872 Is_True (Fld_index < FLD_Table_Size (), 00873 (msg, "TY::fld should be a valid index to the Fld_Table")); 00874 00875 // Verify FLD 00876 if (Fld_index > 0) 00877 FLD_Verify_all (FLD_HANDLE (Fld_index), size); 00878 00879 Is_True (u2.etype == 0, (msg, "non-zero TY::etyp for KIND_STRUCT")); 00880 00881 break; 00882 00883 case KIND_FUNCTION: 00884 00885 TY_Verify_Kind_Function (kind, size, mtype); 00886 00887 Tylist_index = TY_tylist (*this); 00888 00889 Is_True (Tylist_index > 0 && Tylist_index < TYLIST_Table_Size (), 00890 (msg, "Invalid TY::tylist for KIND_FUNCTION")); 00891 00892 ty_idx = TY_IDX_index (Tylist_Table[Tylist_index]); 00893 00894 do { 00895 Is_True (ty_idx > 0 && ty_idx < TY_Table_Size (), 00896 (msg, "Invalid TY_IDX in prototype")); 00897 ++Tylist_index; 00898 Is_True (Tylist_index < TYLIST_Table_Size (), 00899 (msg, "TYLIST_IDX out of bound")); 00900 ty_idx = TY_IDX_index (Tylist_Table[Tylist_index]); 00901 } while (ty_idx != 0); 00902 00903 break; 00904 00905 case KIND_ARRAY: 00906 00907 Is_True( TY_arb(*this).Idx() > 0 && TY_arb(*this).Idx() < ARB_Table_Size (), 00908 (msg, "TY::arb should be set for KIND_ARRAY")); 00909 00910 ARB_Verify_all (TY_arb (*this)); 00911 00912 Is_True( TY_IDX_index (TY_etype (*this)) > 0 && 00913 TY_IDX_index (TY_etype (*this)) < TY_Table_Size (), 00914 (msg, "TY::etype should be set for KIND_ARRAY")); 00915 00916 break; 00917 00918 case KIND_VOID: 00919 00920 Is_True (size == 0, (msg, "non-zero size for KIND_VOID")); 00921 00922 Is_True (u1.fld == 0, (msg, "non-zero TY::fld for KIND_VOID")); 00923 00924 Is_True (u2.etype == 0, (msg, "non-zero TY::etype for KIND_VOID")); 00925 00926 break; 00927 00928 case KIND_POINTER: 00929 Is_True (size == Pointer_Size, (msg, "Invalid size for KIND_POINTER")); 00930 00931 Is_True (u1.fld == 0, 00932 (msg, "non-zero TY::fld for KIND_POINTER")); 00933 00934 Is_True (TY_IDX_index (TY_pointed (*this)) > 0 && 00935 TY_IDX_index (TY_pointed (*this)) < TY_Table_Size (), 00936 (msg, "invalid TY_IDX for KIND_POINTER")); 00937 00938 break; 00939 00940 case KIND_SCALAR: 00941 00942 Is_True (u1.fld == 0, (msg, "non-zero TY::fld for KIND_SCALAR")); 00943 00944 Is_True (u2.etype == 0, (msg, "non-zero TY::etype for KIND_SCALAR")); 00945 00946 break; 00947 } 00948 00949 // Flag checking 00950 00951 if ( TY_is_union (*this)) 00952 Is_True (kind == KIND_STRUCT, 00953 (msg, "TY_IS_UNION can only be set for STRUCTS")); 00954 00955 if ( TY_is_packed (*this)) 00956 Is_True (kind == KIND_STRUCT, 00957 (msg, "TY_IS_PACKED can only be set for STRUCTS/CLASSES")); 00958 00959 if ( TY_ptr_as_array (*this)) 00960 Is_True (kind == KIND_POINTER, 00961 (msg, "TY_PTR_AS_ARRAY can only be set for POINTERS")); 00962 00963 if ( TY_anonymous (*this)) 00964 Is_True (kind == KIND_STRUCT, 00965 (msg, "TY_ANONYMOUS can only be set for STRUCTS/CLASSES")); 00966 00967 #endif // Is_True_On 00968 } // TY::Verify() 00969 00970 // ====================================================================== 00971 // PU::Verify(): other pu related checks go into this function 00972 // ====================================================================== 00973 // (See table 11 in the Whirl Symbol Table Specification) 00974 // PU::Verify Calls : TY::Verify (to verify the prototype ty) 00975 00976 void PU::Verify(UINT) const 00977 { 00978 #ifdef Is_True_On 00979 00980 // until we define what this is, it has to be zero 00981 Is_True (PU_target_idx (*this) == TARGET_INFO_IDX_ZERO, 00982 ("PU::target_info_idx != 0")); 00983 00984 // Verify prototype ty 00985 Is_True (TY_IDX_index (prototype) > 0 && 00986 TY_IDX_index (prototype) < TY_Table_Size (), 00987 ("Invalid TY_IDX in PU::prototype")); 00988 00989 Is_True (unused == 0, ("unused fields must be zero")); 00990 00991 // Verify flags 00992 static char msg[] = "Invalid PU flags: (%s)"; 00993 00994 if ( PU_is_mainpu (*this) || 00995 PU_has_return_address (*this)) 00996 Is_True( PU_no_inline (*this), 00997 (msg, "Recursive or main pus and pus that contain return address, should be marked no-inline")); 00998 00999 if ( PU_no_inline (*this) && PU_must_inline (*this)) 01000 Fail_FmtAssertion (msg, "must_inline and no_inline"); 01001 01002 if ( PU_has_exc_scopes (*this)) 01003 Is_True( PU_cxx_lang (*this), 01004 (msg, "exception scopes can only be set for a C++ language pu")); 01005 01006 Is_True (PU_lexical_level (*this) > 1, 01007 (msg, "Lexical level for pu should be > 1")); 01008 01009 if ( PU_is_nested_func (*this)) 01010 Is_True( PU_lexical_level (*this) > 2, 01011 (msg, "Lexical level for nested pu should be > 2")); 01012 01013 if ( PU_args_aliased (*this)) 01014 Is_True(PU_ftn_lang(*this), 01015 (msg, "PU_ARGS_ALIASED may only be set for F77 or F90")); 01016 01017 if ( PU_has_namelist (*this)) 01018 Is_True(PU_ftn_lang(*this), 01019 (msg, "PU_HAS_NAMELIST may only be set for F77 or F90")); 01020 01021 if ( PU_has_altentry (*this)) 01022 Is_True(PU_ftn_lang(*this), 01023 (msg, "PU_HAS_ALTENTRY may only be set for F77 or F90")); 01024 01025 if ( (PU_c_lang (*this) && PU_ftn_lang (*this)) || 01026 (PU_cxx_lang (*this) && PU_ftn_lang (*this)) || 01027 (PU_c_lang (*this) && PU_cxx_lang (*this)) || 01028 (PU_f77_lang (*this) && PU_f90_lang (*this))) 01029 Fail_FmtAssertion (msg," PU src lang bits cannot be set to multiple languagess"); 01030 01031 #endif // Is_True_On 01032 } // PU::Verify() 01033 01034 01035 01036 // ====================================================================== 01037 // FILE_INFO::Verify(): other file related checks go into this function 01038 // ====================================================================== 01039 // (See table 32 and 33 in the Whirl Symbol Table Specification) 01040 01041 void FILE_INFO::Verify() const 01042 { 01043 #ifdef Is_True_On 01044 Is_True(unused == 0, 01045 ("Invalid FILE_INFO field: unused")); 01046 #endif // Is_True_On 01047 } // FILE_INFO::Verify() 01048 01049 01050 // ====================================================================== 01051 // SCOPE::Verify(): other file related checks go into this function 01052 // ====================================================================== 01053 // (See table 1 in the Whirl Symbol Table Specification) 01054 01055 template <class T> 01056 struct verify_op 01057 { 01058 UINT level; 01059 verify_op(UINT lev) : level(lev) { } 01060 void operator () (UINT idx, T *entry) const; 01061 }; 01062 01063 template <class T> 01064 inline void 01065 verify_op<T>::operator () (UINT, T *entry) const { 01066 entry->Verify(level); 01067 } 01068 01069 // specialization for verifying TCONs 01070 01071 template <> 01072 inline void 01073 verify_op <TCON>::operator () (UINT, TCON *tc) const 01074 { 01075 TCON_Verify(*tc); 01076 } 01077 01078 01079 // ====================================================================== 01080 // Verify_LOCAL_SYMTAB(): 01081 // ====================================================================== 01082 01083 // At the least verify ST, LABEL, PREG, INITO, and ST_ATTR: which are 01084 // present in LOCAL AND GLOBAL symbol tables 01085 // Shouldn't the second parameter type be UINT32 instead of 01086 // SYMTAB_IDX? Levels are UINT32 everywhere else, it seems. -- RK 01087 void Verify_LOCAL_SYMTAB (const SCOPE& scope, SYMTAB_IDX level) 01088 { 01089 #ifdef Is_True_On 01090 01091 // Verify st for the scope 01092 01093 scope.st->Verify(level); 01094 01095 // Verify TABLES: ST, LABEL, PREG, INITO 01096 01097 if (ST_Table_Size (level)) { 01098 For_all_entries(*scope.st_tab , verify_op<ST >(level), 1); 01099 } 01100 if (LABEL_Table_Size (level)) { 01101 For_all_entries(*scope.label_tab , verify_op<LABEL>(level), 1); 01102 } 01103 if (PREG_Table_Size (level)) { 01104 For_all_entries(*scope.preg_tab , verify_op<PREG >(level), 1); 01105 } 01106 if (INITO_Table_Size (level)) { 01107 For_all_entries(*scope.inito_tab , verify_op<INITO>(level), 1); 01108 } 01109 if (ST_ATTR_Table_Size (level)) { 01110 For_all_entries(*scope.st_attr_tab , verify_op<ST_ATTR >(level), 1); 01111 } 01112 01113 #endif // Is_True_On 01114 } 01115 01116 // ====================================================================== 01117 // Verify_GLOBAL_SYMTAB(): 01118 // ====================================================================== 01119 01120 void Verify_GLOBAL_SYMTAB() 01121 { 01122 const SCOPE & scope = Scope_tab[GLOBAL_SYMTAB]; 01123 01124 #ifdef Is_True_On 01125 // Verify that LABEL and PREG tables are EMPTY 01126 Is_True ( scope.label_tab == NULL, 01127 ("LABEL Table can only appear in LOCAL symtab")); 01128 01129 Is_True ( scope.preg_tab == NULL, 01130 ("PREG Table can only appear in LOCAL symtab")); 01131 01132 // Verify TABLES: ST and INITO (LABEL, PREG, are empty) 01133 if ( ST_Table_Size (GLOBAL_SYMTAB)) 01134 For_all (St_Table, GLOBAL_SYMTAB, verify_op<ST>(GLOBAL_SYMTAB)); 01135 01136 if ( INITO_Table_Size (GLOBAL_SYMTAB)) 01137 For_all (Inito_Table, GLOBAL_SYMTAB, verify_op<INITO>(GLOBAL_SYMTAB)); 01138 01139 if ( ST_ATTR_Table_Size (GLOBAL_SYMTAB)) 01140 For_all (St_Attr_Table, GLOBAL_SYMTAB, verify_op<ST_ATTR>(GLOBAL_SYMTAB)); 01141 01142 // Verify other tables 01143 // FILE_INFO, TY, FLD, ARB, TCON, 01144 01145 File_info.Verify(); 01146 01147 if ( TY_Table_Size () > 1) 01148 For_all (Ty_Table, verify_op<TY>(GLOBAL_SYMTAB)); 01149 if ( TCON_Table_Size () ) 01150 For_all (Tcon_Table, verify_op<TCON>(GLOBAL_SYMTAB)); 01151 if ( INITV_Table_Size () > 1) 01152 For_all (Initv_Table, verify_op<INITV>(GLOBAL_SYMTAB)); 01153 01154 #endif // Is_True_On 01155 } 01156