25 #include "pips_config.h"
59 string result =
strdup (
"");
65 for (
int i = 8; i < indent; i++) {
82 "\tuser name = \"", name,
"\"\n",
97 pips_debug(3,
"Derived found, let's look at it\n");
101 pips_debug(3,
"Struct found, let's go deeper\n");
106 pips_debug(3,
"typedef found, let's look at it\n");
115 return ((result == NULL) ?
strdup (
"") : result);
131 isfortran?
"common /":
"memory area \"",
158 "Non-empty area %s should have a final size greater than 0\n",
172 "Non-empty area %s should have a final size greater than 0\n",
228 "\"\toffset = UNKNOWN, \tsize = DYNAMIC",
235 "\"\toffset = UNKNOWN,\tsize = ",
236 s>0?
i2a(s):
"unknown",
NL, NULL));
244 pips_debug(3,
"extended information required\n");
257 if (strcmp (deeper,
"") != 0) {
279 if(!
ENDP(equiv_members)){
281 if(!
ENDP(equiv_members)) {
421 for(ce=edecls; !
ENDP(ce);
POP(ce)) {
586 bool isfortran =
false;
612 bool reset_p =
false;
614 debug_on(
"SYMBOL_TABLE_DEBUG_LEVEL");
string list_to_string(list l)
Return the malloc()ed version of the concatenation of all the strings in the list.
cons * arguments_union(cons *a1, cons *a2)
cons * arguments_union(cons * a1, cons * a2): returns a = union(a1, a2) where a1 and a2 are lists of ...
cons * arguments_difference(cons *a1, cons *a2)
set difference: a1 - a2 ; similar to set intersection
const char * module_name(const char *s)
Return the module part of an entity name.
FILE * safe_fopen(const char *filename, const char *what)
int safe_fclose(FILE *stream, const char *filename)
bool get_bool_property(const string)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....
static int array_size(dim)
ARRAY_SIZE returns the number of elements in the array whose dimension list is DIM.
void reset_current_module_entity(void)
Reset the current module entity.
entity set_current_module_entity(entity)
static.c
entity get_current_module_entity(void)
Get the entity of the current module.
#define ENDP(l)
Test if a list is empty.
#define POP(l)
Modify a list pointer to point on the next element of the list.
#define NIL
The empty list (nil in Lisp)
list gen_copy_seq(list l)
Copy a list structure.
#define CAR(pcons)
Get the value of the first element of a list.
void gen_free_list(list l)
free the spine of the list
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on all the elements of a list.
#define list_undefined
Undefined list definition :-)
void gen_sort_list(list l, gen_cmp_func_t compare)
Sorts a list of gen_chunks in place, to avoid allocations...
#define DB_PUT_FILE_RESOURCE
Put a file resource into the current workspace database.
void set_prettyprint_language_tag(enum language_utype lang)
set the prettyprint language from a language_utype argument
string db_build_file_resource_name(const char *rname, const char *oname, const char *suffix)
returns an allocated file name for a file resource.
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
#define pips_internal_error
#define user_warning(fn,...)
char * i2a(int)
I2A (Integer TO Ascii) yields a string for a given Integer.
string concatenate(const char *,...)
Return the concatenation of the given strings.
void string_buffer_append(string_buffer, const string)
append string s (if non empty) to string buffer sb, the duplication is done if needed according to th...
string string_buffer_to_string(const string_buffer)
return malloc'ed string from string buffer sb
void string_buffer_free(string_buffer *)
free string buffer structure, also free string contents according to the dup field
string_buffer string_buffer_make(bool dup)
allocate a new string buffer
int(* gen_cmp_func_t)(const void *, const void *)
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
string db_get_current_workspace_directory(void)
list words_qualifiers(list obj)
list words_dimensions(list dims, list *ppdl)
string basic_to_string(basic)
#define DYNAMIC_RAM_OFFSET
FI: I would have assumed that it is used for the stack area, but I must be wrong.....
#define UNDEFINED_RAM_OFFSET
bool stack_area_p(entity aire)
bool heap_area_p(entity aire)
void dump_functional(functional f, string_buffer result)
list get_common_members(entity common, entity __attribute__((unused)) module, bool __attribute__((unused)) only_primary)
The fprint_functional() and fprint_environment() functions are moved from syntax/declaration....
const char * entity_user_name(entity e)
Since entity_local_name may contain PIPS special characters such as prefixes (label,...
bool entity_list_p(list el)
Checks that el only contains entity.
const char * entity_local_name(entity e)
entity_local_name modified so that it does not core when used in vect_fprint, since someone thought t...
int compare_entities(const entity *pe1, const entity *pe2)
Comparison function for qsort.
bool entity_struct_p(entity e)
Is entity e the entity corresponding to a struct declaration?
entity module_name_to_entity(const char *mn)
This is an alias for local_name_to_top_level_entity.
bool entity_enum_p(entity e)
bool typedef_entity_p(entity e)
void sort_list_of_entities(list l)
sorted in place.
const char * module_local_name(entity e)
Returns the module local user name.
bool entity_module_p(entity e)
bool derived_entity_p(entity e)
const char * entity_module_name(entity e)
See comments about module_name().
bool entity_union_p(entity e)
Is entity e an entity representing the union declaration?
bool SizeOfArray(entity, int *)
This function computes the total size of a variable in bytes, ie.
bool place_holder_variable_p(entity)
_int SizeOfElements(basic)
This function returns the length in bytes of the Fortran or C type represented by a basic,...
string type_to_string(const type)
type.c
#define type_functional_p(x)
#define storage_formal_p(x)
#define basic_typedef_p(x)
#define type_functional(x)
#define basic_pointer_p(x)
#define basic_derived_p(x)
#define entity_storage(x)
#define code_declarations(x)
#define storage_formal(x)
#define language_fortran95_p(x)
#define entity_undefined_p(x)
#define variable_qualifiers(x)
#define variable_dimensions(x)
#define language_fortran_p(x)
#define entity_domain_number(x)
#define storage_return_p(x)
#define type_variable_p(x)
#define storage_undefined_p(x)
#define entity_domain
newgen_syntax_domain_defined
#define variable_basic(x)
#define entity_initial(x)
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
internally defined structure.
The structure used to build lists in NewGen.
string get_symbol_table(entity m, bool isfortran)
void dump_common_layout(string_buffer result, entity c, bool debug_p, bool isfortran)
This function is called from c_parse() via ResetCurrentModule() and fprint_environment()
bool parsed_symbol_table(const char *module_name)
bool c_symbol_table(const char* module_name)
static string check_derived_and_typedef(basic b, int indent, const char *parent)
bool symbol_table(const char *module_name)
To replace c_symbol_table() and fortran_symbol_table() because the information about the language is ...
static string indent_table[9]
void actual_symbol_table_dump(const char *module_name, bool is_parsed)
static string entities_type_and_name(list entities, int indent, const char *parent)