Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
fecif.c File Reference
#include "defines.h"
#include <nl_types.h>
#include <nlcatmsg.h>
#include <time.h>
#include "cif.h"
#include "cifprocs.h"
#include "host.m"
#include "host.h"
#include "target.m"
#include "target.h"
#include "globals.m"
#include "tokens.m"
#include "sytb.m"
#include "p_globals.m"
#include "s_globals.m"
#include "debug.m"
#include "cif.m"
#include "fecif.m"
#include "globals.h"
#include "tokens.h"
#include "sytb.h"
#include "p_globals.h"
#include "s_globals.h"
#include "fecif.h"
#include <unistd.h>
Include dependency graph for fecif.c:

Go to the source code of this file.

Defines

#define __NLS_INTERNALS   1 /* Obtain internal <nl_types.h> definitions. */
#define CIF_VERSION   3
#define outbuf1   output_buf[0]
#define outbuf2   output_buf[1]
#define FILE_ID_LIST_SIZE   1000

Functions

static int cif_data_type (int)
static void cif_flush_include_recs (void)
static int get_line_and_file_id (int, int *)
static void output_minimal_object_rec (int)
static void process_attr_list (int, boolean)
static boolean output_struct_ids (opnd_type *)
void init_cif (char *comp_date_time, char *release_level)
void cif_prog_unit_init (void)
void cif_send_sytb ()
void cif_send_attr (int attr_idx, int dt_attr_idx)
void cif_directive_rec (cif_directive_code_type dir, int line, int col)
int cif_file_name_rec (char *file_name, char *user_specified_file_name)
void cif_include_rec (int line_num, int col_num, int include_file_id)
void cif_message_rec (int msg_num, int glb_line_num, int col_num, msg_severities_type msg_severity, char *msg_text, long arg0, long arg1, long arg2, long arg3, char *scoping_unit_name, int relative_order)
void cif_source_file_rec (int source_file_id, src_form_type source_form)
void cif_summary_rec (char *release_level, char *gen_date, char *gen_time, float elapsed_time, long aux_elapsed_time, long max_field_len)
void cif_unit_rec (void)
void cif_copy_temp_to_actual_CIF (void)
void cif_end_unit_rec (char *name_ptr)
void cif_usage_rec (int obj_idx, fld_type obj_fld, int line_num, int col_num, int usage_code)
void cif_sb_usage_rec (int sb_idx, int line_num, int col_num, cif_usage_code_type usage_code)
void cif_enable_disable_rec (void)
void cif_machine_characteristics_rec (void)
void cif_stmt_type_rec (boolean exact_stmt_type_known, cif_stmt_type exact_stmt_type, int stmt_number)
void cif_cont_line_rec (int continuation_type, int line_number)
void cif_call_site_rec (int ir_idx, int gen_idx)
void cif_named_constant_rec (int attr_idx, int start_line, int start_column)
void cif_loop_def_rec (void)
void cif_label_rec (int attr_idx)
void cif_misc_compiler_opts_rec (void)
void cif_optimization_opts_rec (void)
void cif_begin_scope_rec (void)
void cif_end_scope_rec (void)
void cif_scope_info_rec (void)
void cif_use_module_rec (int attr_idx, int mf_tbl_idx, boolean send_attr)
int cif_rename_rec (int ro_idx, int cif_symbol_id, int attr_idx, int module_attr_idx)
void cif_fake_a_unit ()
void Cif_Error ()
void close_cif ()
void cif_object_rec_for_func_result (int attr_idx)

Variables

static char USMID [] = "\n@(#)5.0_pl/sources/fecif.c 5.9 10/14/99 12:53:57\n"
static char output_buf [2][64]

Define Documentation

#define __NLS_INTERNALS   1 /* Obtain internal <nl_types.h> definitions. */

Definition at line 42 of file fecif.c.

#define CIF_VERSION   3

Definition at line 57 of file fecif.c.

#define FILE_ID_LIST_SIZE   1000

Referenced by cif_flush_include_recs().

#define outbuf1   output_buf[0]

Definition at line 104 of file fecif.c.

Referenced by cif_call_site_rec(), and cif_send_attr().

#define outbuf2   output_buf[1]

Definition at line 105 of file fecif.c.


Function Documentation

void cif_cont_line_rec ( int  continuation_type,
int  line_number 
)

Definition at line 3667 of file fecif.c.

References c_i_f, Cif_Continuation_Rec(), and get_line_and_file_id().

Referenced by fixed_get_stmt(), and free_get_stmt().

Here is the call graph for this function:

void cif_copy_temp_to_actual_CIF ( void  )

Definition at line 2890 of file fecif.c.

References c_i_f, cif_tmp_file, EOF, fprintf(), Func_Entry, Func_Exit, NULL, and TRACE.

Referenced by cif_unit_rec(), and stmt_level_semantics().

Here is the call graph for this function:

void cif_directive_rec ( cif_directive_code_type  dir,
int  line,
int  col 
)

Definition at line 2338 of file fecif.c.

References c_i_f, Cif_Cdir_Rec(), Func_Entry, Func_Exit, get_line_and_file_id(), NULL, and TRACE.

Referenced by parse_dir_directives().

Here is the call graph for this function:

int cif_file_name_rec ( char *  file_name,
char *  user_specified_file_name 
)

Definition at line 2378 of file fecif.c.

References c_i_f, Cif_File_Rec(), Func_Entry, Func_Exit, NEXT_FILE_ID, NULL, and TRACE.

Referenced by cif_use_module_rec(), init_cif(), init_src_input(), and open_include_file().

Here is the call graph for this function:

void cif_include_rec ( int  line_num,
int  col_num,
int  include_file_id 
)

Definition at line 2418 of file fecif.c.

References c_i_f, Cif_Include_Rec(), Cif_Src_Pos_Rec(), Func_Entry, Func_Exit, get_line_and_file_id(), NULL, and TRACE.

Referenced by open_include_file().

Here is the call graph for this function:

void cif_message_rec ( int  msg_num,
int  glb_line_num,
int  col_num,
msg_severities_type  msg_severity,
char *  msg_text,
long  arg0,
long  arg1,
long  arg2,
long  arg3,
char *  scoping_unit_name,
int  relative_order 
)

Definition at line 2484 of file fecif.c.

References c_i_f, CIF_MESSAGE, Cif_Message_Rec(), EOS, EXIT, format_idx, Func_Entry, Func_Exit, get_line_and_file_id(), Internal, last_msg_file_rec, Log_Error, Log_Warning, NULL, PRINTMSG(), and TRACE.

Referenced by output_msg().

Here is the call graph for this function:

void cif_object_rec_for_func_result ( int  attr_idx)

Definition at line 6666 of file fecif.c.

References AT_CIF_DONE, AT_REFERENCED, ATP_RSLT_IDX, cif_send_attr(), FALSE, Func_Entry, Func_Exit, NULL, NULL_IDX, Referenced, and TRACE.

Referenced by call_list_semantics(), and resolve_ext_opr().

Here is the call graph for this function:

int cif_rename_rec ( int  ro_idx,
int  cif_symbol_id,
int  attr_idx,
int  module_attr_idx 
)

Definition at line 5575 of file fecif.c.

References AT_CIF_SYMBOL_ID, AT_MODULE_IDX, AT_ORIG_NAME_PTR, c_i_f, Cif_F90_Rename_Rec(), curr_scp_idx, Func_Entry, Func_Exit, NEXT_SYMBOL_ID, NULL, RO_NAME_PTR, SCP_CIF_ID, and TRACE.

Referenced by rename_only_semantics().

Here is the call graph for this function:

void cif_sb_usage_rec ( int  sb_idx,
int  line_num,
int  col_num,
cif_usage_code_type  usage_code 
)

Definition at line 3154 of file fecif.c.

References c_i_f, Cif_Usage_Rec(), Func_Entry, Func_Exit, get_line_and_file_id(), NEXT_SYMBOL_ID, NULL, SB_CIF_SYMBOL_ID, and TRACE.

Referenced by parse_attrs(), and parse_common_stmt().

Here is the call graph for this function:

void cif_send_attr ( int  attr_idx,
int  dt_attr_idx 
)

Definition at line 682 of file fecif.c.

References Assumed_Size, ASSUMED_SIZE_CHAR, Assumed_Size_Char, AT_ATTR_LINK, AT_CIF_DONE, AT_CIF_IN_USAGE_REC, AT_CIF_SYMBOL_ID, AT_CIF_USE_IN_BND, AT_COMPILER_GEND, AT_DCL_ERR, AT_HOST_ASSOCIATED, AT_IS_DARG, AT_IS_INTRIN, AT_MODULE_IDX, AT_NAME_IDX, AT_OBJ_CLASS, AT_OBJ_NAME, AT_OBJ_NAME_PTR, AT_OPTIONAL, AT_ORIG_NAME_IDX, AT_PRIVATE, AT_REF_IN_CHILD, AT_REFERENCED, AT_TYPED, AT_USE_ASSOCIATED, ATD_ALLOCATABLE, ATD_ARRAY_IDX, ATD_AUXILIARY, ATD_CLASS, ATD_CPNT_OFFSET_IDX, ATD_DATA_INIT, ATD_DCL_EQUIV, ATD_EQUIV, ATD_FUNC_IDX, ATD_IN_COMMON, ATD_INTENT, ATD_OFFSET_ASSIGNED, ATD_OFFSET_FLD, ATD_OFFSET_IDX, ATD_POINTER, ATD_PTR_IDX, ATD_SAVED, ATD_SF_DARG, ATD_STOR_BLK_IDX, ATD_TARGET, ATD_TMP_NEEDS_CIF, ATD_TYPE_IDX, ATI_CIF_SCOPE_ID, ATI_CIF_SEEN_IN_CALL, ATI_FIRST_SPECIFIC_IDX, ATI_INTERFACE_CLASS, ATI_NUM_SPECIFICS, ATI_PROC_IDX, ATI_UNNAMED_INTERFACE, ATI_USER_SPECIFIED, ATN_FIRST_NAMELIST_IDX, ATN_NUM_NAMELIST, ATP_ALT_ENTRY, ATP_CIF_DARG_PROC, ATP_DCL_EXTERNAL, ATP_EXPL_ITRFC, ATP_EXTRA_DARG, ATP_FIRST_IDX, ATP_IN_INTERFACE_BLK, ATP_NAME_IN_STONE, ATP_NOSIDE_EFFECTS, ATP_NUM_DARGS, ATP_PGM_UNIT, ATP_PROC, ATP_RECURSIVE, ATP_RSLT_IDX, ATP_SCP_ALIVE, ATP_VFUNCTION, ATT_CIF_DT_ID, ATT_FIRST_CPNT_IDX, ATT_NUM_CPNTS, ATT_PRIVATE_CPNT, ATT_SEQUENCE_SET, Based, BD_ARRAY_CLASS, BD_LB_FLD, BD_LB_IDX, BD_RANK, BD_UB_FLD, BD_UB_IDX, Blockdata, c_i_f, Character, CIF_ALLOCATABLE, CIF_CRI_POINTEE, CIF_DARG_IN_BND, CIF_DATA_INIT, cif_data_type(), CIF_DEFAULT_TYPED, CIF_EQUIVALENCED, Cif_Error(), Cif_F90_Derived_Type_Rec(), Cif_F90_Entry_Rec(), Cif_F90_Int_Block_Rec(), CIF_IMPLICITLY_TYPED, CIF_INTENT_IN, CIF_INTENT_INOUT, CIF_INTENT_OUT, CIF_KIND_TYPED, cif_label_rec(), cif_named_constant_rec(), CIF_OPTIONAL, CIF_PGM_DEFINITION, CIF_PGM_IN_INTERFACE, CIF_PGM_OPTIONAL, CIF_PGM_PRIVATE, CIF_PGM_RECURSIVE, CIF_PGM_REFERENCE, CIF_PGM_USE_ASSOCIATED, CIF_POINTER, CIF_PRIVATE, CIF_RENAMED, CIF_SAVED, cif_send_attr(), CIF_STAR_TYPED, CIF_TARGET, CN_CONST, CN_INT_TO_C, CN_Tbl_Idx, CN_TYPE_IDX, Common, Compiler_Tmp, Constant, CONVERT_CVAL_TO_STR, convert_to_string(), CRI__Pointee, curr_scp_idx, Data_Obj, Default_Typed, Defined_Assign_Interface, Derived_Type, Dummy_Argument, EOI, EOR, Equivalenced, EXIT, Extern_Proc, FALSE, Formal, fprintf(), Func_Entry, Func_Exit, Function, Function_Result, Generic_Function_Interface, Generic_Subroutine_Interface, Generic_Unknown_Interface, get_other_func_rslt_info, glb_tbl_idx, Integer_8, Intent_In, Intent_Inout, Intent_Out, Intent_Unseen, Interface, Intrin_Proc, Kind_Typed, Label, Main_Attr_Idx, Module, Module_Proc, name_pool, Namelist_Grp, NEXT_DERIVED_TYPE_ID, NEXT_SYMBOL_ID, NO_Tbl_Idx, Not_Referenced, NULL, NULL_CHAR, NULL_IDX, outbuf1, output_minimal_object_rec(), Pgm_Unit, Pgm_Unknown, Program, SB_BLK_TYPE, SB_CIF_SYMBOL_ID, SB_MODULE, SCP_ATTR_IDX, SCP_CIF_ID, SCP_LEVEL, SCP_PARENT_IDX, SN_ATTR_IDX, SN_SIBLING_LINK, Stack, Star_Typed, Static, Static_Local, Static_Named, Stmt_Func, Struct_Component, Structure, Subroutine, Task_Common, TRACE, TRUE, TYP_CHAR_CLASS, TYP_DESC, TYP_FLD, TYP_IDX, TYP_LINEAR, TYP_TYPE, Unknown_Proc, and VAR_LEN_CHAR.

Referenced by cif_call_site_rec(), cif_object_rec_for_func_result(), cif_send_attr(), cif_send_sytb(), cif_use_module_rec(), end_blockdata(), end_function(), end_module(), end_program_unit(), end_subroutine(), and process_attr_list().

Here is the call graph for this function:

void cif_source_file_rec ( int  source_file_id,
src_form_type  source_form 
)

Definition at line 2617 of file fecif.c.

References c_i_f, CIF_F90_FORM_FIXED, CIF_F90_FORM_FREE, Cif_Srcfile_Rec(), Fixed_Form, Func_Entry, Func_Exit, NULL, and TRACE.

Referenced by init_src_input(), and open_include_file().

Here is the call graph for this function:

void cif_summary_rec ( char *  release_level,
char *  gen_date,
char *  gen_time,
float  elapsed_time,
long  aux_elapsed_time,
long  max_field_len 
)

Definition at line 2694 of file fecif.c.

References c_i_f, Cif_Summary_Rec(), code_size, curr_glb_line, data_size, Func_Entry, Func_Exit, L, NULL, NULL_CHAR, and TRACE.

Referenced by main(), and PRINTMSG().

Here is the call graph for this function:

void cif_usage_rec ( int  obj_idx,
fld_type  obj_fld,
int  line_num,
int  col_num,
int  usage_code 
)

Definition at line 2984 of file fecif.c.

References AT_CIF_IN_USAGE_REC, AT_CIF_SYMBOL_ID, AT_COMPILER_GEND, AT_DCL_ERR, AT_OBJ_CLASS, AT_Tbl_Idx, ATD_CLASS, ATD_TMP_NEEDS_CIF, ATP_IN_INTERFACE_BLK, ATP_INTERFACE_IDX, ATP_PROC, c_i_f, Cif_Error(), CIF_No_Usage_Rec, cif_number_of_struct_ids, CIF_USAGE, Cif_Usage_Rec(), Compiler_Tmp, Data_Obj, EOI, EOR, EXIT, find_base_attr(), find_left_attr(), fprintf(), Func_Entry, Func_Exit, get_line_and_file_id(), Intrin_Proc, NEXT_SYMBOL_ID, NO_Tbl_Idx, NULL, OPND_FLD, OPND_IDX, output_struct_ids(), Pgm_Unit, skip_struct_base, TRACE, and TRUE.

Referenced by array_construct_semantics(), attr_semantics(), build_loop_tbl(), call_list_semantics(), check_for_dup_derived_type_lbl(), check_label_ref(), ck_lbl_construct_name(), forall_semantics(), gen_attr_and_IR_for_lbl(), generic_spec_semantics(), parse_assign_stmt(), parse_attrs(), parse_case_stmt(), parse_common_stmt(), parse_cpnt_dcl_stmt(), parse_cycle_stmt(), parse_decode_stmt(), parse_derived_type_stmt(), parse_do_stmt(), parse_dummy_args(), parse_else_stmt(), parse_encode_stmt(), parse_end_stmt(), parse_entry_stmt(), parse_equivalence_stmt(), parse_exit_stmt(), parse_io_control_list(), parse_module_stmt(), parse_namelist_stmt(), parse_parameter_stmt(), parse_pointer_stmt(), parse_print_stmt(), parse_prog_unit(), parse_read_stmt(), parse_stmt_func_stmt(), parse_type_dcl_stmt(), parse_type_spec(), parse_use_stmt(), rename_only_semantics(), resolve_ext_opr(), resolve_used_modules(), set_function_rslt(), start_new_prog_unit(), start_new_subpgm(), and struct_opr_handler().

Here is the call graph for this function:

void cif_use_module_rec ( int  attr_idx,
int  mf_tbl_idx,
boolean  send_attr 
)
void close_cif ( void  )

Definition at line 6471 of file fecif.c.

References c_i_f, cif_actual_file, cif_tmp_file, cif_tmp_file_name, Func_Entry, Func_Exit, NULL, and TRACE.

Referenced by exit_compiler().

static void output_minimal_object_rec ( int  attr_idx) [static]

Definition at line 5887 of file fecif.c.

References AT_CIF_SYMBOL_ID, AT_OBJ_NAME_PTR, c_i_f, Cif_Error(), curr_scp_idx, EOI, EOR, fprintf(), Func_Entry, Func_Exit, NEXT_SYMBOL_ID, NULL, NULL_CHAR, SCP_CIF_ID, and TRACE.

Referenced by cif_send_attr().

Here is the call graph for this function:

static void process_attr_list ( int  al_idx,
boolean  error_list 
) [static]

Definition at line 6732 of file fecif.c.

References AL_ATTR_IDX, AL_NEXT_IDX, AT_CIF_SYMBOL_ID, AT_COMPILER_GEND, AT_OBJ_CLASS, ATD_CLASS, ATD_TMP_NEEDS_CIF, cif_send_attr(), Compiler_Tmp, Data_Obj, Func_Entry, Func_Exit, NULL, NULL_IDX, Pgm_Unit, and TRACE.

Referenced by cif_send_sytb().

Here is the call graph for this function:


Variable Documentation

char output_buf[2][64] [static]

Definition at line 102 of file fecif.c.

char USMID[] = "\n@(#)5.0_pl/sources/fecif.c 5.9 10/14/99 12:53:57\n" [static]

Definition at line 37 of file fecif.c.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines