PIPS
|
#include "genC.h"
#include "naming.h"
#include "private.h"
#include "pipsdbm_private.h"
#include <regex.h>
Go to the source code of this file.
Data Structures | |
struct | t_tmp_result |
FI wants a sort... More... | |
Macros | |
#define | IGNORE_RX "PIPS_IGNORE_FUNCTION_RX" |
#define | db_resource_stored_p(r) db_status_stored_p(db_resource_db_status(r)) |
shorthands More... | |
#define | db_resource_loaded_p(r) db_status_loaded_p(db_resource_db_status(r)) |
#define | db_resource_required_p(r) db_status_required_p(db_resource_db_status(r)) |
#define | db_resource_loaded_and_stored_p(r) db_status_loaded_and_stored_p(db_resource_db_status(r)) |
#define | DB_OK pips_assert("defined database", !pips_database_undefined_p()) |
the pips_database stores pips resources. More... | |
#define | DB_UNDEF pips_assert("undefined database", pips_database_undefined_p()) |
#define | debug_db_resource(l, r, o, p) ifdebug(l) { dump_db_resource(r, o, p);} |
#define | gen_DB_VOID_cons(i, l) gen_cons(i,l) |
Typedefs | |
typedef struct t_tmp_result * | p_tmp_result |
Functions | |
static bool | simple_name_p (const char *name) |
Module names must use some characters. More... | |
static db_symbol | find_or_create_db_symbol (const char *name) |
void | db_create_pips_database (void) |
exported interface is minimal. More... | |
static void | db_clean_db_resources () |
latter More... | |
bool | db_open_pips_database (FILE *fd) |
void | db_save_pips_database (FILE *fd) |
void | db_close_pips_database (void) |
void | db_reset_pips_database_if_necessary (void) |
static string | db_status_string (db_status s) |
static void | dump_db_resource (const char *rname, const char *oname, db_resource r) |
void | dump_all_db_resource_status (FILE *file, string where) |
static void | init_owned_resources_if_necessary (const char *name) |
static db_owned_resources | get_db_owned_resources (const char *oname) |
static db_resource | get_resource (const char *rname, db_owned_resources or) |
static db_resource | get_db_resource (const char *rname, const char *oname) |
static db_resource | get_real_db_resource (const char *rname, const char *oname) |
static db_resource | find_or_create_db_resource (const char *rname, const char *oname) |
void | db_delete_resource (const char *rname, const char *oname) |
Delete a resource. More... | |
bool | db_update_time (const char *rname, const char *oname) |
this should really be a put. More... | |
static p_tmp_result | make_tmp_result (int t, const char *on, const char *rn) |
static int | tmp_result_cmp (const p_tmp_result *p1, const p_tmp_result *p2) |
void | db_print_all_required_resources (FILE *file) |
void | db_clean_all_required_resources (void) |
bool | db_resource_required_or_available_p (const char *rname, const char *oname) |
from now on we must not know about the database internals? More... | |
bool | db_resource_is_required_p (const char *rname, const char *oname) |
true if exists and in required state. More... | |
bool | db_resource_p (const char *rname, const char *oname) |
true if exists and in loaded or stored state. More... | |
bool | db_touch_resource (const char *rname, const char *oname) |
touch logical time for resource[owner], possibly behind the back of pipsdbm. More... | |
static void | db_check_time (const char *rname, const char *oname, db_resource r) |
static void | db_load_resource (const char *rname, const char *oname, db_resource r) |
int | db_time_of_resource (const char *rname, const char *oname) |
static void | db_save_resource (const char *rname, const char *oname, db_resource r) |
static void | db_save_and_free_resource (const char *rname, const char *oname, db_resource r, bool do_free) |
string | db_get_resource_id (const char *rname, const char *oname) |
some way to identify a resource... More... | |
string | db_get_memory_resource (const char *rname, const char *oname, bool pure) |
Return the pointer to the resource, whatever it is. More... | |
void | db_set_resource_as_required (const char *rname, const char *oname) |
void | db_put_or_update_memory_resource (const char *rname, const char *oname, void *p, bool update_is_ok) |
Put a resource into the current workspace database. More... | |
void | db_invalidate_memory_resource (const char *rname, const char *oname) |
int | db_unput_resources (const char *rname) |
Delete all the resources of a given type "rname". More... | |
list | db_retrieve_resources (const char *rname) |
Retrieve all the db resources of a given resource type, "rname". More... | |
static string | db_resource_name_or_owner_name (db_resource dbr, bool owner_p) |
Retrieve the resource name, a.k.a. More... | |
string | db_resource_name (void *dbr) |
To be used for debugging. More... | |
string | db_resource_owner_name (void *dbr) |
To be used for debugging. More... | |
void | db_save_and_free_memory_resource_if_any (const char *rname, const char *oname, bool do_free) |
void | db_delete_all_resources (void) |
FC: I added this function to clean all resources, hence avoiding to save them. More... | |
bool | db_set_current_module_name (const char *name) |
string | db_get_current_module_name (void) |
Also used to check whether set... More... | |
void | db_reset_current_module_name (void) |
int | db_delete_obsolete_resources (bool(*keep_p)(const char *, const char *)) |
delete all obsolete resources before a close. More... | |
bool | db_module_exists_p (const char *name) |
Return whether name is a "valid" module. More... | |
gen_array_t | db_get_module_list_initial_order (void) |
static gen_array_t | db_get_module_or_function_list (bool module_p, bool func_p) |
Returns an allocated array a with the sorted list of modules. More... | |
gen_array_t | db_get_module_list (void) |
Get an array of all the modules (functions, procedures and compilation units) of a workspace. More... | |
gen_array_t | db_get_function_list (void) |
Get an array of all the functions and procedures (not compilation units) of a workspace. More... | |
gen_array_t | db_get_compilation_unit_list (void) |
Get an array of all the compilation units of a workspace. More... | |
Variables | |
static char * | current_module_name = NULL |
when telling the database about a module name, the module is registered as a db_symbol, and it is added to the database. More... | |
#define DB_OK pips_assert("defined database", !pips_database_undefined_p()) |
the pips_database stores pips resources.
{init,close,set_reset,get}_pips_database() {store,load,delete,update,store_or_update}_pips_database() bound_pips_database_p()
Definition at line 104 of file database.c.
#define db_resource_loaded_and_stored_p | ( | r | ) | db_status_loaded_and_stored_p(db_resource_db_status(r)) |
Definition at line 56 of file database.c.
#define db_resource_loaded_p | ( | r | ) | db_status_loaded_p(db_resource_db_status(r)) |
Definition at line 53 of file database.c.
#define db_resource_required_p | ( | r | ) | db_status_required_p(db_resource_db_status(r)) |
Definition at line 54 of file database.c.
#define db_resource_stored_p | ( | r | ) | db_status_stored_p(db_resource_db_status(r)) |
shorthands
Definition at line 52 of file database.c.
#define DB_UNDEF pips_assert("undefined database", pips_database_undefined_p()) |
Definition at line 105 of file database.c.
#define debug_db_resource | ( | l, | |
r, | |||
o, | |||
p | |||
) | ifdebug(l) { dump_db_resource(r, o, p);} |
Definition at line 221 of file database.c.
#define gen_DB_VOID_cons | ( | i, | |
l | |||
) | gen_cons(i,l) |
Definition at line 401 of file database.c.
#define IGNORE_RX "PIPS_IGNORE_FUNCTION_RX" |
Definition at line 46 of file database.c.
typedef struct t_tmp_result * p_tmp_result |
|
static |
just check for updates
update time of actual resource if appropriate
??? just warn... may be a user error?
Definition at line 547 of file database.c.
References db_get_logical_time(), db_inc_logical_time(), db_resource_file_time, db_resource_loaded_and_stored_p, db_resource_loaded_p, db_resource_pointer, db_resource_time, dbll_database_managed_file_p(), dbll_stat_local_file(), dbll_stat_resource_file(), displayable_file_p(), pips_assert, and pips_user_warning.
Referenced by db_load_resource(), and db_time_of_resource().
void db_clean_all_required_resources | ( | void | ) |
of db_symbols
Owner Symbol, Owned Resources
Resource Symbol, DB Resource
DEBUG?
Mark owner symbol os as to be deleted if set of owned resouces is empty.
maybe temporarily required by pipsmake but some error occured
Definition at line 460 of file database.c.
References CONS, db_delete_resource(), db_owned_resources_hash_table, DB_OWNED_RESOURCES_MAP, db_resource_required_p, DB_RESOURCES_MAP, DB_SYMBOL, db_symbol_name, delete_db_resources(), dump_db_resource(), hash_table_entry_count(), MAP, NIL, pips_debug, and pips_user_warning.
Referenced by make(), and safe_do_something().
|
static |
latter
on checkpoints...
there are some incoherencies!
maybe the required stuff should be handled by pipsmake on its own?
scan
to be deleted later on
also if the file vanished... maybe on checkpoints where obsolete resources are not removed...
delete
Definition at line 295 of file database.c.
References CAR, CDR, CONS, db_delete_resource(), DB_OWNED_RESOURCES_MAP, db_resource_db_status, db_resource_loaded_and_stored_p, db_resource_loaded_p, db_resource_pointer, db_resource_required_p, DB_RESOURCES_MAP, db_status_tag, db_symbol_name, dbll_stat_resource_file(), dump_all_db_resource_status(), dump_db_resource(), gen_free_list(), get_db_resource(), ifdebug, is_db_status_stored, NIL, pips_debug, and STRING.
Referenced by db_open_pips_database().
void db_close_pips_database | ( | void | ) |
Definition at line 150 of file database.c.
References DB_OK, and DB_UNDEF.
Referenced by save_meta_data().
void db_create_pips_database | ( | void | ) |
exported interface is minimal.
??? statement_mapping
Definition at line 109 of file database.c.
References DB_OK, and DB_UNDEF.
Referenced by db_create_workspace().
void db_delete_all_resources | ( | void | ) |
FC: I added this function to clean all resources, hence avoiding to save them.
This speed up hpfc at low cost;-).
Definition at line 1030 of file database.c.
References DB_OK, db_unput_resources(), dbll_get_ith_resource_name(), and dbll_number_of_resources().
Referenced by delete_all_resources(), and delete_some_resources().
delete all obsolete resources before a close.
return the number of resources destroyed.
of string
Definition at line 1076 of file database.c.
References CAR, CONS, db_delete_resource(), DB_OK, DB_OWNED_RESOURCES_FOREACH, db_resource_required_p, DB_RESOURCES_FOREACH, db_symbol_name, dbll_unlink_resource_file(), debug_off, debug_on, ENDP, gen_free_list(), NIL, pips_debug, POP, and STRING.
Referenced by delete_obsolete_resources().
void db_delete_resource | ( | const char * | rname, |
const char * | oname | ||
) |
Delete a resource.
let us do it!
??? I should unlink the file
rname | name |
oname | name |
Definition at line 353 of file database.c.
References DB_OK, db_owned_resources_undefined_p, db_resource_loaded_and_stored_p, db_resource_loaded_p, db_resource_pointer, db_resource_undefined_p, dbll_free_resource(), delete_db_owned_resources(), find_or_create_db_symbol(), free_db_resource(), get_db_owned_resources(), get_resource(), and pips_assert.
Referenced by db_clean_all_required_resources(), db_clean_db_resources(), db_delete_obsolete_resources(), db_get_memory_resource(), db_save_and_free_resource(), db_unput_resources(), outliner_independent(), and remove_a_resource().
string db_get_current_module_name | ( | void | ) |
Also used to check whether set...
so no asserts, even DB_OK.
Definition at line 1059 of file database.c.
References current_module_name.
Referenced by create_new_entity(), display(), edit_notify(), get_time_ent(), get_view_file(), gpips_display_plain_file(), gpips_execute_and_display_something(), gpips_execute_and_display_something_from_alias(), hpfc_notify(), info(), lazy_open_module(), make_close_workspace(), open_module(), pa_feasibility_ofl_ctrl(), perform(), select_a_module_by_default(), select_module_from_menubar_callback(), select_module_notify(), show_module(), tp_some_info(), transform_notify(), wpips_display_plain_file(), wpips_display_WP65_file(), wpips_execute_and_display_something(), wpips_execute_and_display_something_from_alias(), and wpips_file_view().
gen_array_t db_get_module_list_initial_order | ( | void | ) |
of db_symbol
Definition at line 1151 of file database.c.
References bound_db_resources_p(), compilation_unit_p(), DB_OK, DB_SYMBOL, db_symbol_domain, db_symbol_name, FOREACH, gen_array_dupappend(), gen_array_make(), gen_filter_tabulated(), gen_free_list(), gen_true(), IGNORE_RX, pips_user_error, same_string_p, string_undefined_p, and symbol().
Referenced by step_compile_generated_module(), step_install(), and unsplit_internal().
string db_get_resource_id | ( | const char * | rname, |
const char * | oname | ||
) |
some way to identify a resource...
could be an id...
rname | name |
oname | name |
Definition at line 704 of file database.c.
References get_real_db_resource().
Referenced by check_physical_resource_up_to_date(), make_required(), rmake(), and update_preserved_resources().
void db_invalidate_memory_resource | ( | const char * | rname, |
const char * | oname | ||
) |
Check the database coherency:
Get the database resource associated to the given resource:
rname | name |
oname | name |
Definition at line 897 of file database.c.
References DB_OK, db_resource_db_status, db_resource_file_time, db_status_undefined_p, and find_or_create_db_resource().
|
static |
should it be checked elsewhere?
Definition at line 587 of file database.c.
References db_check_time(), db_resource_db_status, db_resource_pointer, db_resource_stored_p, db_status_tag, dbll_load_resource(), dbll_very_special_resource_p(), is_db_status_loaded, is_db_status_loaded_and_stored, pips_assert, and pips_debug.
Referenced by db_get_memory_resource(), and db_time_of_resource().
bool db_open_pips_database | ( | FILE * | fd | ) |
fd | d |
Definition at line 119 of file database.c.
References db_clean_db_resources(), DB_OK, db_resources_undefined_p, DB_UNDEF, dump_all_db_resource_status(), ifdebug, and read_db_resources().
Referenced by load_meta_data().
void db_print_all_required_resources | ( | FILE * | file | ) |
first collect result
then sort, dump and free
file | ile |
Definition at line 421 of file database.c.
References CAR, CONS, DB_OWNED_RESOURCES_MAP, db_resource_db_status, db_resource_required_p, db_resource_time, DB_RESOURCES_MAP, db_status_string(), db_symbol_name, fprintf(), free(), gen_free_list(), gen_sort_list(), make_tmp_result(), MAPL, NIL, t_tmp_result::owner_name, pips_debug, t_tmp_result::res_name, t_tmp_result::time, and tmp_result_cmp().
Referenced by make(), and rmake().
void db_reset_current_module_name | ( | void | ) |
Definition at line 1064 of file database.c.
References current_module_name, DB_OK, free(), and pips_assert.
Referenced by display(), make_close_workspace(), open_module(), and perform().
void db_reset_pips_database_if_necessary | ( | void | ) |
Definition at line 155 of file database.c.
Referenced by reset_meta_data().
bool db_resource_is_required_p | ( | const char * | rname, |
const char * | oname | ||
) |
true if exists and in required state.
rname | name |
oname | name |
Definition at line 512 of file database.c.
References DB_OK, db_resource_required_p, db_resource_undefined_p, and get_db_resource().
Referenced by rmake().
string db_resource_name | ( | void * | dbr | ) |
To be used for debugging.
dbr | br |
Definition at line 1000 of file database.c.
References db_resource_name_or_owner_name().
Referenced by make_cache_consistent_p(), print_make_cache(), and remove_resource_from_make_cache().
|
static |
Retrieve the resource name, a.k.a.
kind or nature, or the resource owner name of db_resource "dbr" according to "owner_p".
The two-level mapping must be inverted.
string_undefined is returned if "dbr" is not found in the current resource database.
This is used for interactive debugging and for debug messages.
Definition at line 975 of file database.c.
References DB_OK, DB_OWNED_RESOURCES_MAP, DB_RESOURCES_MAP, db_symbol_name, pips_debug, s1, and string_undefined.
Referenced by db_resource_name(), and db_resource_owner_name().
string db_resource_owner_name | ( | void * | dbr | ) |
To be used for debugging.
dbr | br |
Definition at line 1006 of file database.c.
References db_resource_name_or_owner_name().
Referenced by make_cache_consistent_p(), print_make_cache(), and remove_resource_from_make_cache().
bool db_resource_p | ( | const char * | rname, |
const char * | oname | ||
) |
true if exists and in loaded or stored state.
rname | name |
oname | name |
Definition at line 524 of file database.c.
References DB_OK, db_resource_loaded_and_stored_p, db_resource_loaded_p, db_resource_stored_p, db_resource_undefined_p, and get_db_resource().
Referenced by bootstrap(), bootstrap_kernels(), bootstrap_stubs(), check_physical_resource_up_to_date(), check_resource_up_to_date(), compilation_unit_of_module(), db_checkpoint_workspace(), db_open_workspace(), do_inlining(), flag_as_stub(), flag_kernel(), generic_initializer(), get_module_precondition(), get_stubs(), just_show(), language_module_p(), load_summary_transformer(), make_cache_consistent_p(), make_required(), module_entity_to_compilation_unit_entity(), module_in_user_file_p(), module_name_to_input_file_name(), node(), old_summary_precondition(), preserve_virtual_resource(), recursive_append(), remove_a_resource(), rmake(), show(), the_actual_parser(), and touch_a_resource().
bool db_resource_required_or_available_p | ( | const char * | rname, |
const char * | oname | ||
) |
from now on we must not know about the database internals?
true if exists and in ANY state.
rname | name |
oname | name |
Definition at line 505 of file database.c.
References DB_OK, db_resource_undefined_p, and get_db_resource().
Referenced by AddEntityToCompilationUnit(), outliner_independent(), RemoveEntityFromCompilationUnit(), and step_analysed_module_p().
list db_retrieve_resources | ( | const char * | rname | ) |
Retrieve all the db resources of a given resource type, "rname".
Scan all module hash tables to find all resources of kind "rname", no matter what the owner is.
Used only to clean up the make cache in pipsmake.c.
Derived from db_unput_resources()
Scan all resource maps or of owners
See if it contains a resource of kind rname, normalized to r
rname | name |
Definition at line 943 of file database.c.
References bound_db_owned_resources_p(), CONS, DB_OK, DB_RESOURCE, DB_RESOURCES_MAP, find_or_create_db_symbol(), get_resource(), NIL, and pips_debug.
Referenced by delete_named_resources().
void db_save_and_free_memory_resource_if_any | ( | const char * | rname, |
const char * | oname, | ||
bool | do_free | ||
) |
rname | name |
oname | name |
do_free | o_free |
Definition at line 1012 of file database.c.
References DB_OK, db_resource_loaded_and_stored_p, db_resource_loaded_p, db_resource_undefined_p, db_save_and_free_resource(), get_db_resource(), and pips_debug.
Referenced by db_close_module().
|
static |
??? manual fix for entities... which are not well integrated.
is loaded
lost.. just delete the resource.
Definition at line 648 of file database.c.
References db_delete_resource(), db_resource_db_status, db_resource_file_time, db_resource_loaded_and_stored_p, db_resource_loaded_p, db_resource_pointer, db_status_tag, dbll_free_resource(), dbll_save_and_free_resource(), dbll_stat_resource_file(), dbll_storable_p(), dbll_very_special_resource_p(), is_db_status_loaded, is_db_status_loaded_and_stored, is_db_status_stored, pips_assert, and pips_debug.
Referenced by db_save_and_free_memory_resource_if_any().
void db_save_pips_database | ( | FILE * | fd | ) |
db_resources dbres;
??? check for required resources left over?
save a cleaned COPY with status artificially set as STORED...
dbres = copy_db_resources(get_pips_database()); db_clean_db_resources(dbres);
free_db_resources(dbres);
fd | d |
Definition at line 137 of file database.c.
References DB_OK, and write_db_resources().
Referenced by save_meta_data().
|
static |
already saved
let us set the file time if appropriate...
Definition at line 627 of file database.c.
References db_resource_db_status, db_resource_file_time, db_resource_loaded_and_stored_p, db_resource_loaded_p, db_resource_pointer, db_status_tag, dbll_save_resource(), dbll_stat_resource_file(), dbll_storable_p(), displayable_file_p(), is_db_status_stored, pips_assert, pips_debug, and pips_internal_error.
Referenced by db_get_memory_resource().
bool db_set_current_module_name | ( | const char * | name | ) |
can be rejected softly
name | ame |
Definition at line 1045 of file database.c.
References current_module_name, DB_OK, init_owned_resources_if_necessary(), ok, pips_assert, pips_user_warning, simple_name_p(), and strdup().
Referenced by display(), open_module(), and perform().
void db_set_resource_as_required | ( | const char * | rname, |
const char * | oname | ||
) |
newly created db_resource...
rname | name |
oname | name |
Definition at line 797 of file database.c.
References db_get_logical_time(), DB_OK, db_resource_db_status, db_resource_pointer, db_resource_time, db_status_loaded_and_stored_p, db_status_loaded_p, db_status_string(), db_status_tag, db_status_undefined_p, dbll_free_resource(), find_or_create_db_resource(), is_db_status_required, make_db_status(), pips_debug, and UU.
Referenced by rmake().
Definition at line 163 of file database.c.
References db_status_tag, db_status_undefined_p, is_db_status_loaded, is_db_status_loaded_and_stored, is_db_status_required, is_db_status_stored, and pips_internal_error.
Referenced by db_print_all_required_resources(), db_set_resource_as_required(), dump_all_db_resource_status(), and dump_db_resource().
int db_time_of_resource | ( | const char * | rname, |
const char * | oname | ||
) |
we load the resource if it is a simple file name... the file time stamps are checked here anyway.
will update time if needed.
may update time...
rname | name |
oname | name |
Definition at line 603 of file database.c.
References db_check_time(), db_load_resource(), DB_OK, db_resource_required_p, db_resource_stored_p, db_resource_time, db_resource_undefined_p, displayable_file_p(), and get_db_resource().
Referenced by check_physical_resource_up_to_date(), and rmake().
bool db_touch_resource | ( | const char * | rname, |
const char * | oname | ||
) |
touch logical time for resource[owner], possibly behind the back of pipsdbm.
rname | name |
oname | name |
Definition at line 538 of file database.c.
References db_get_logical_time(), DB_OK, db_resource_time, and get_real_db_resource().
Referenced by AddEntityToCompilationUnit(), linearize_array_generic(), normalize_microcode(), outliner_independent(), preserve_virtual_resource(), RemoveEntityFromCompilationUnit(), sort_parameters(), and touch_a_resource().
int db_unput_resources | ( | const char * | rname | ) |
Delete all the resources of a given type "rname".
Return the number of deleted resources
Each owner map has to be checked because of two-level mapping used.
rname | name |
Definition at line 915 of file database.c.
References bound_db_owned_resources_p(), count, db_delete_resource(), DB_OK, DB_RESOURCES_MAP, db_symbol_name, dbll_unlink_resource_file(), find_or_create_db_symbol(), and pips_debug.
Referenced by activate_phase(), db_delete_all_resources(), and delete_named_resources().
bool db_update_time | ( | const char * | rname, |
const char * | oname | ||
) |
this should really be a put.
Just there for upward compatibility.
bll_stat_resource_file(rname, oname, true);
rname | name |
oname | name |
Definition at line 380 of file database.c.
References db_get_logical_time(), DB_OK, db_resource_file_time, db_resource_pointer, db_resource_time, dbll_stat_local_file(), displayable_file_p(), get_real_db_resource(), and pips_assert.
void dump_all_db_resource_status | ( | FILE * | file, |
string | where | ||
) |
file | ile |
where | here |
Definition at line 198 of file database.c.
References DB_OWNED_RESOURCES_MAP, db_resource_db_status, db_resource_file_time, db_resource_pointer, db_resource_time, DB_RESOURCES_MAP, db_status_string(), db_symbol_name, fprintf(), and pips_debug.
Referenced by db_checkpoint_workspace(), db_clean_db_resources(), and db_open_pips_database().
|
static |
Definition at line 183 of file database.c.
References db_resource_db_status, db_resource_file_time, db_resource_pointer, db_resource_time, db_resource_undefined_p, db_status_string(), ifdebug, and pips_debug.
Referenced by db_clean_all_required_resources(), and db_clean_db_resources().
|
static |
still lazy...
create it
Definition at line 267 of file database.c.
References db_owned_resources_undefined_p, db_resource_undefined_p, db_status_undefined, extend_db_owned_resources(), find_or_create_db_symbol(), get_db_owned_resources(), get_resource(), init_owned_resources_if_necessary(), make_db_resource(), and pips_debug.
Referenced by db_invalidate_memory_resource(), db_put_or_update_memory_resource(), and db_set_resource_as_required().
|
static |
Definition at line 85 of file database.c.
References db_symbol_domain, db_symbol_undefined_p, gen_find_tabulated(), make_db_symbol(), pips_user_warning, simple_name_p(), and strdup().
Referenced by db_delete_resource(), db_retrieve_resources(), db_unput_resources(), find_or_create_db_resource(), get_db_owned_resources(), get_resource(), and init_owned_resources_if_necessary().
|
static |
Definition at line 231 of file database.c.
References db_owned_resources_undefined, and find_or_create_db_symbol().
Referenced by db_delete_resource(), find_or_create_db_resource(), and get_db_resource().
|
static |
lazy...
pips_internal_error("no owned resources for %s", oname, rname);
Definition at line 247 of file database.c.
References db_owned_resources_undefined_p, get_db_owned_resources(), get_resource(), init_owned_resources_if_necessary(), and pips_debug.
Referenced by db_clean_db_resources(), db_get_memory_resource(), db_resource_is_required_p(), db_resource_p(), db_resource_required_or_available_p(), db_save_and_free_memory_resource_if_any(), db_time_of_resource(), and get_real_db_resource().
|
static |
Definition at line 259 of file database.c.
References db_resource_required_p, db_resource_undefined_p, get_db_resource(), and pips_internal_error.
Referenced by db_get_resource_id(), db_touch_resource(), and db_update_time().
|
static |
Definition at line 238 of file database.c.
References apply_db_owned_resources(), bound_db_owned_resources_p(), db_resource_undefined, debug_db_resource, and find_or_create_db_symbol().
Referenced by db_delete_resource(), db_retrieve_resources(), find_or_create_db_resource(), and get_db_resource().
|
static |
set the owner_resources in the pips_database.
Definition at line 223 of file database.c.
References find_or_create_db_symbol(), and make_db_owned_resources().
Referenced by db_set_current_module_name(), find_or_create_db_resource(), and get_db_resource().
|
static |
Definition at line 403 of file database.c.
References malloc(), t_tmp_result::owner_name, t_tmp_result::res_name, and t_tmp_result::time.
Referenced by db_print_all_required_resources().
|
static |
Module names must use some characters.
Upper case letters and underscore for Fortran, but also lower case letters and the FILE_SEP_STRING "#" added for C compilation unit FC 12/08/2003
FILE_SEP_STRING added for compilation units (FI) MODULE_SEP_STRING added for static C functions (FI) #ifndef FILE_SEP_STRING /* in ri-util *\/ #define FILE_SEP_STRING "!" #endif /* FILE_SEP_STRING *\/ #ifndef MODULE_SEP_STRING /* in ri-util *\/ #define MODULE_SEP_STRING ":" #endif /* MODULE_SEP_STRING *\/ #define MODULE_NAME_CHARS \ ( "ABCDEFGHIJKLMNOPQRSTUVWXYZ" \ "0123456789" \ "abcdefghijklmnopqrstuvwxyz" \ FILE_SEP_STRING MODULE_SEP_STRING "|_#-." )
Definition at line 80 of file database.c.
References MODULE_NAME_CHARS.
Referenced by db_set_current_module_name(), and find_or_create_db_symbol().
|
static |
Definition at line 412 of file database.c.
References if().
Referenced by db_print_all_required_resources().
|
static |
when telling the database about a module name, the module is registered as a db_symbol, and it is added to the database.
Definition at line 1043 of file database.c.
Referenced by db_get_current_module_name(), db_reset_current_module_name(), and db_set_current_module_name().