PIPS
|
#include <stdio.h>
#include <sys/stat.h>
#include <sys/types.h>
#include "linear.h"
#include "genC.h"
#include "properties.h"
#include "misc.h"
#include "pipsdbm.h"
#include "ri-util.h"
#include "bootstrap.h"
#include "preprocessor.h"
#include "pipsmake.h"
#include "top-level.h"
Go to the source code of this file.
Functions | |
void | default_update_props () |
Warning! Do not modify this file that is automatically generated! More... | |
static void | push_path (void) |
static void | pop_path (void) |
static void | safe_pop_path (void) |
In case an error has been detected, both create_workspace and close_workspace may attempt to clean up various static data structures. More... | |
bool | open_module (const char *name) |
tpips used to convert lower cases into upper cases for all module names, but this is no longer possible with C functions. More... | |
bool | open_module_if_unique (void) |
Open the module of a workspace if there is only one. More... | |
bool | create_workspace (gen_array_t files) |
FI: should be called "initialize_workspace()"; a previous call to db_create_workspace() is useful to create the log file between the two calls says RK. More... | |
bool | lazy_open_module (const char *name) |
Do not open a module already opened : More... | |
bool | open_workspace (const char *name) |
should be: success (cf wpips.h) More... | |
bool | close_workspace (bool is_quit) |
bool | delete_workspace (const char *wname) |
bool | check_delete_workspace (const char *wname, bool check) |
void | compile_f90_module (string filename) |
gen_array_t | get_stubs () |
Get all stubs. More... | |
Variables | |
void(* | pips_update_props_handler )()=default_update_props |
default assignment of pips_update_props_handler is default_update_props. More... | |
static string | saved_pips_src_path = NULL |
PIPS SRCPATH before opening the workspace, for restauration. More... | |
static bool | some_saved_path = false |
Yes but at least close the LOGFILE if we delete the current workspace since it will fail on NFS because of the open file descriptor (creation of .nfs files). RK
wname | name |
check | heck |
Definition at line 375 of file dbm.c.
References close_log_file(), close_makefile(), close_processed_include_cache(), close_warning_file(), concatenate(), current, db_get_current_workspace_name(), failure(), free(), pips_user_error, pips_user_warning, safe_system_no_abort(), same_string_p, strdup(), and strescape().
Referenced by delete_workspace(), and quit_notify().
It is useless to save on disk some non up to date resources:
lear_props();
is_quit | s_quit |
Definition at line 346 of file dbm.c.
References close_log_file(), close_processed_include_cache(), close_warning_file(), db_get_current_workspace_name(), delete_some_resources(), make_close_workspace(), pips_user_error, reset_label_counter(), reset_static_entities(), safe_pop_path(), and safe_reset_entity_to_size().
Referenced by close_workspace_if_opened(), close_workspace_notify(), pips_main(), quit_notify(), and tp_close_the_workspace().
void compile_f90_module | ( | string | filename | ) |
filename | ilename |
Definition at line 410 of file dbm.c.
References concatenate(), db_get_current_workspace_directory(), pips_user_warning, and strdup().
Referenced by create_workspace().
bool create_workspace | ( | gen_array_t | files | ) |
FI: should be called "initialize_workspace()"; a previous call to db_create_workspace() is useful to create the log file between the two calls says RK.
files | iles |
Definition at line 180 of file dbm.c.
References activate_language(), activate_phases(), bootstrap(), CATCH, close_log_file(), close_warning_file(), compile_f90_module(), db_get_current_workspace_directory(), db_get_current_workspace_name(), dot_f90_file_p(), dot_f95_file_p(), free(), free_language(), gen_array_item(), gen_array_nitems(), get_bool_property(), init_processed_include_cache(), language_undefined, open_log_file(), open_module_if_unique(), open_warning_file(), pips_assert, pop_path(), process_user_file(), push_path(), reset_entity_to_size(), reset_pips_current_computation(), reset_static_entities(), RETHROW, set_entity_to_size(), set_pips_current_computation(), TRY, UNCATCH, user_exception_error, user_log(), and workspace_language().
Referenced by create(), end_create_workspace_notify(), execute_workspace_creation_and_so_on_given_with_options(), and pips_main().
void default_update_props | ( | void | ) |
Warning! Do not modify this file that is automatically generated!
Modify src/Libs/top-level/top-level-local.h instead, to add your own modifications. header file built by cproto top_level-local.h Top-level declares a extern jmp_buf pips_top_level : cproto-generated files dbm.c
bool delete_workspace | ( | const char * | wname | ) |
wname | name |
Definition at line 368 of file dbm.c.
References check_delete_workspace().
Referenced by end_delete_workspace_notify().
gen_array_t get_stubs | ( | void | ) |
Get all stubs.
The returned value is allocated dynamically and needs to be freed by the caller of this function
Definition at line 433 of file dbm.c.
References callees_callees, db_get_memory_resource(), db_resource_p(), gen_array_from_list(), and NIL.
Referenced by pyps_get_stubs().
bool lazy_open_module | ( | const char * | name | ) |
Do not open a module already opened :
name | ame |
Definition at line 289 of file dbm.c.
References current_name, db_get_current_module_name(), db_get_current_workspace_name(), open_module(), pips_assert, and user_log().
Referenced by end_select_module_callback(), end_select_module_notify(), and tp_set_current_module().
bool open_module | ( | const char * | name | ) |
tpips used to convert lower cases into upper cases for all module names, but this is no longer possible with C functions.
To make it easier for the user and for the validation, an upper case version of name is open if name cannot be open.
reset if needed
name | ame |
Definition at line 95 of file dbm.c.
References db_get_current_module_name(), db_get_current_workspace_name(), db_module_exists_p(), db_reset_current_module_name(), db_set_current_module_name(), free(), module_name(), pips_user_error, pips_user_warning, reset_unique_variable_numbers(), strdup(), strupper(), and user_log().
Referenced by lazy_open_module(), open_module_if_unique(), and pips_main().
bool open_module_if_unique | ( | void | ) |
Open the module of a workspace if there is only one.
Definition at line 144 of file dbm.c.
References compilation_unit_p(), db_get_current_workspace_name(), db_get_module_list(), gen_array_full_free(), gen_array_item(), gen_array_nitems(), open_module(), parse_makefile(), and pips_assert.
Referenced by create_workspace(), open_workspace(), and pips_main().
bool open_workspace | ( | const char * | name | ) |
should be: success (cf wpips.h)
should be show_message
FI: what happens since log_file is not open?
name | ame |
Definition at line 309 of file dbm.c.
References db_get_current_workspace_directory(), db_get_current_workspace_name(), free(), init_processed_include_cache(), make_open_workspace(), open_log_file(), open_module_if_unique(), open_warning_file(), pips_user_error, push_path(), reset_static_entities(), set_entity_to_size(), user_log(), workspace_exists_p(), and workspace_ok_p().
Referenced by end_open_workspace_notify(), execute_workspace_creation_and_so_on_given_with_options(), and pips_main().
|
static |
Definition at line 71 of file dbm.c.
References free(), pips_assert, pips_srcpath_set(), saved_pips_src_path, and some_saved_path.
Referenced by create_workspace().
|
static |
Definition at line 61 of file dbm.c.
References db_get_directory_name_for_module(), free(), pips_assert, some_saved_path, and WORKSPACE_SRC_SPACE.
Referenced by create_workspace(), and open_workspace().
|
static |
In case an error has been detected, both create_workspace and close_workspace may attempt to clean up various static data structures.
Definition at line 81 of file dbm.c.
References free(), pips_srcpath_set(), saved_pips_src_path, and some_saved_path.
Referenced by close_workspace().
|
default |
default assignment of pips_update_props_handler is default_update_props.
Some top-level (eg. wpips) may need a special update_props proceedure; they should let pips_update_props_handler point toward it.
Definition at line 53 of file dbm.c.
Referenced by gpips_main(), and wpips_main().
|
static |
PIPS SRCPATH before opening the workspace, for restauration.
also works if the path was not set.
Definition at line 58 of file dbm.c.
Referenced by pop_path(), and safe_pop_path().
Definition at line 59 of file dbm.c.
Referenced by pop_path(), push_path(), and safe_pop_path().