PIPS
|
#include <stdio.h>
#include <string.h>
#include "linear.h"
#include "genC.h"
#include "misc.h"
#include "ri.h"
#include "ri-util.h"
Go to the source code of this file.
Variables | |
static entity | current_module_entity = entity_undefined |
static variables and related access functions concerning the current module More... | |
static list | current_module_declaration_list =list_undefined |
static statement | current_module_statement = statement_undefined |
used to retrieve the intraprocedural effects of the current module More... | |
static statement | stacked_current_module_statement = statement_undefined |
hash_table | keyword_typedef_table = hash_table_undefined |
Because of typedefs, the C lexers need help to decide if a character string such as toto is a type name or a keyword or an identifier. More... | |
static int | token_named_type = -1 |
static stack | statement_global_stack = stack_undefined |
void declare_new_typedef | ( | const string | tn | ) |
tn | n |
Definition at line 283 of file static.c.
References hash_put(), keyword_typedef_table, strdup(), and token_named_type.
Referenced by AddEntityToCompilationUnit().
void error_reset_current_module_entity | ( | void | ) |
To be called by an error management routine only.
Definition at line 109 of file static.c.
References current_module_entity, entity_undefined, and reset_current_module_declarations().
Referenced by c_parser_error(), ParserError(), and reset_static_phase_variables().
void error_reset_current_module_statement | ( | void | ) |
To be called by an error management routine only.
Definition at line 234 of file static.c.
References current_module_statement, reset_current_module_declarations(), stacked_current_module_statement, and statement_undefined.
Referenced by AbortEntries(), and reset_static_phase_variables().
void free_keyword_typedef_table | ( | void | ) |
Definition at line 275 of file static.c.
References hash_table_free(), hash_table_undefined, and keyword_typedef_table.
Referenced by csplit_error_handler(), and csplit_reset().
void free_statement_global_stack | ( | void | ) |
Definition at line 358 of file static.c.
References stack_free(), stack_undefined, and statement_global_stack.
Referenced by generic_module_name_to_transformers(), generic_points_to_analysis(), generic_print_xml_application(), initial_precondition(), live_out_paths_from_caller_to_callee(), make_statement_global_stack(), module_name_to_preconditions(), partial_eval(), program_precondition(), and summary_precondition().
statement get_current_statement_from_statement_global_stack | ( | void | ) |
Definition at line 344 of file static.c.
References stack_empty_p(), stack_head(), statement_global_stack, and statement_undefined.
Referenced by c_user_call_to_transformer(), call_to_transformer(), points_to_context_statement_line_number(), semantics_expression_to_points_to_sinks(), semantics_expression_to_points_to_sources(), and semantics_user_warning_alist().
_int is_c_keyword_typedef | ( | char * | s | ) |
This function checks if s is a C keyword or typedef name and returns the token number thanks to the hash-table keyword_typedef_table.
It returns an integer number corresponding to the keyword.
It returns 0 if s is not a keyword/typedef name
Definition at line 297 of file static.c.
References hash_get(), HASH_UNDEFINED_VALUE, and keyword_typedef_table.
Referenced by is_c_parser_keyword_typedef(), and is_c_preprocessor_keyword_typedef().
hash_table make_keyword_typedef_table | ( | int | tk | ) |
tk | k |
Definition at line 256 of file static.c.
References hash_string, hash_table_make(), keyword_typedef_table, and token_named_type.
Referenced by parser_init_keyword_typedef_table(), and preprocessor_init_keyword_typedef_table().
void make_statement_global_stack | ( | void | ) |
This assert is too strong when user errors occur. Each pass should pprovide a "clean-up" function to be called by user_error() without creating a library cycle
This is an error recovery
Definition at line 318 of file static.c.
References free_statement_global_stack(), stack_make(), stack_undefined_p, statement_domain, and statement_global_stack.
Referenced by generic_module_name_to_transformers(), generic_points_to_analysis(), generic_print_xml_application(), initial_precondition(), live_out_paths_from_caller_to_callee(), module_name_to_preconditions(), partial_eval(), program_precondition(), and summary_precondition().
statement pop_statement_global_stack | ( | void | ) |
Definition at line 352 of file static.c.
References stack_pop(), and statement_global_stack.
Referenced by partial_eval_statement(), statement_to_points_to(), statement_to_postcondition(), statement_to_transformer(), update_precondition_with_call_site_preconditions(), xml_Argument(), xml_Boxes(), xml_Call(), xml_Chain_Graph(), xml_Loop(), xml_Loops(), and xml_Task().
void push_statement_on_statement_global_stack | ( | statement | st | ) |
st | t |
Definition at line 333 of file static.c.
References stack_push(), and statement_global_stack.
Referenced by memorize_precondition_for_summary_precondition(), partial_eval_statement(), statement_to_points_to(), statement_to_postcondition(), statement_to_transformer(), xml_Argument(), xml_Boxes(), xml_Call(), xml_Chain_Graph(), xml_Loop(), xml_Loops(), and xml_Task().
void reset_keyword_typedef_table | ( | void | ) |
Definition at line 268 of file static.c.
References hash_table_undefined, and keyword_typedef_table.
void set_keyword_typedef_table | ( | hash_table | h | ) |
Definition at line 263 of file static.c.
References keyword_typedef_table.
Referenced by AddEntityToCompilationUnit().
bool statement_global_stack_defined_p | ( | void | ) |
Definition at line 364 of file static.c.
References stack_undefined_p, and statement_global_stack.
Referenced by call_to_transformer(), and statement_to_transformer().
|
static |
Definition at line 50 of file static.c.
Referenced by get_current_module_declarations(), reset_current_module_declarations(), and set_current_module_declarations().
|
static |
static variables and related access functions concerning the current module
Be'atrice Apvrille, august 27, 1993 used to store the summary transformer ? to retrieve intraprocedural effects ?
Definition at line 49 of file static.c.
Referenced by error_reset_current_module_entity(), get_current_module_entity(), get_current_module_name(), reset_current_module_entity(), and set_current_module_entity().
|
static |
used to retrieve the intraprocedural effects of the current module
Definition at line 153 of file static.c.
Referenced by error_reset_current_module_statement(), get_current_module_statement(), pop_current_module_statement(), push_current_module_statement(), reset_current_module_statement(), and set_current_module_statement().
hash_table keyword_typedef_table = hash_table_undefined |
Because of typedefs, the C lexers need help to decide if a character string such as toto is a type name or a keyword or an identifier.
Such a table is used by the C preprocessor and by the C parser. It is also updated for in- or outlining with new typedef names.
The table must be initialized with token values generated by bison. The token values could possibly be different for the PIPS preprocessor and syntactic analyzer. Each has its own initialization function, parser_init_keyword_typedef_table() and preprocessor_init_keyword_table().
Definition at line 253 of file static.c.
Referenced by actual_c_parser(), c_parser_put_new_typedef(), declare_new_typedef(), free_keyword_typedef_table(), is_c_keyword_typedef(), keep_track_of_typedef(), make_keyword_typedef_table(), parser_init_keyword_typedef_table(), preprocessor_init_keyword_typedef_table(), put_new_typedef(), reset_keyword_typedef_table(), and set_keyword_typedef_table().
|
static |
Definition at line 154 of file static.c.
Referenced by error_reset_current_module_statement(), pop_current_module_statement(), and push_current_module_statement().
|
static |
Definition at line 316 of file static.c.
Referenced by free_statement_global_stack(), get_current_statement_from_statement_global_stack(), make_statement_global_stack(), pop_statement_global_stack(), push_statement_on_statement_global_stack(), and statement_global_stack_defined_p().
|
static |
Definition at line 254 of file static.c.
Referenced by declare_new_typedef(), and make_keyword_typedef_table().