PIPS
|
Go to the source code of this file.
Functions | |
string | statement_type_as_string (statement stat) |
DEBUG FUNCTION: return a string representing the type of the statement (SEQUENCE, CALL, etc...) More... | |
void | debug_statement (const char *comments, statement stat, int debug_level) |
DEBUG FUNCTION: print debugging informations for a statement stat. More... | |
void | debug_control (const char *comments, control a_control, int debug_level) |
DEBUG FUNCTION: print debugging informations for a control a_control. More... | |
void | debug_unstructured (unstructured an_unstructured, int debug_level) |
DEBUG FUNCTION: print debugging informations for an unstructured an_unstructured. More... | |
void | short_debug_unstructured (unstructured an_unstructured, int debug_level) |
DEBUG FUNCTION: print debugging informations for an unstructured an_unstructured (short version) More... | |
expression | make_expression_from_entity (entity an_entity) |
This function build and return an expression given an entity an_entity. More... | |
statement | make_binary_call_statement (const char *operator_name, expression expression1, expression expression2, statement stat) |
Build and return new statement which is a binary call with the 2 expressions expression1 and expression2, with empty label, statement number and ordering of statement stat, and empty comments. More... | |
entity | clone_variable_with_new_name (entity a_variable, const char *new_name, const char *module_name) |
This function build and return new variable from a variable a_variable, with name new_name. More... | |
entity | make_variable_from_name_and_entity (entity cloned_variable, const char *base_name, statement stat, const char *module_name) |
Build and return new entity obtained by cloning variable cloned_variable, with a name obtained by the concatenation of base_name and the statement ordering of statement stat. More... | |
statement | make_assignement_statement (entity a_variable, expression an_expression, statement stat) |
Build and return new statement which is a assignement of variable a_variable with expression an_expression, with empty label, statement number and ordering of statement stat, and empty comments. More... | |
unstructured | statement_unstructured (statement stat) |
Get the unstructured of a statement. More... | |
int | beautify_ordering (int an_ordering) |
Special function made for Ronan Keryell who likes a lot when a integer number is coded on 3 bits :-) More... | |
void | clean_statement_from_tags (const char *comment_portion, statement stat) |
list | get_statements_with_comments_containing (const char *comment_portion, statement stat) |
bool | statement_is_contained_in_a_sequence_p (statement root_statement, statement searched_stat) |
statement | sequence_statement_containing (statement root_statement, statement searched_stat) |
void | replace_in_sequence_statement_with (statement old_stat, statement new_stat, statement root_stat) |
Replace statement old_stat by statement new_stat, asserting that this statement is contained in a sequence. More... | |
list | references_for_regions (list l_regions) |
Return a list of references corresponding to a list of regions. More... | |
Special function made for Ronan Keryell who likes a lot when a integer number is coded on 3 bits :-)
an_ordering | n_ordering |
Definition at line 407 of file phrase_tools.c.
Referenced by debug_unstructured().
void clean_statement_from_tags | ( | const char * | comment_portion, |
statement | stat | ||
) |
comment_portion | omment_portion |
stat | tat |
Definition at line 414 of file phrase_tools.c.
entity clone_variable_with_new_name | ( | entity | a_variable, |
const char * | new_name, | ||
const char * | module_name | ||
) |
This function build and return new variable from a variable a_variable, with name new_name.
If an entity called new_name already exists, return NULL. New variable is added to declarations
Assert that module represent a value code
This entity does not exist, we can safely create it
new_variable = copy_entity (a_variable); entity_name(new_variable) = strdup(concatenate(module_name, MODULE_SEP_STRING, new_name, NULL));
ew_variable = find_or_create_scalar_entity (strdup(concatenate(module_name, MODULE_SEP_STRING, new_name, NULL)),module_name, is_basic_int);
This entity already exist, we return null
a_variable | _variable |
new_name | ew_name |
module_name | odule_name |
Definition at line 269 of file phrase_tools.c.
Referenced by make_variable_from_name_and_entity().
DEBUG FUNCTION: print debugging informations for a control a_control.
comments | omments |
a_control | _control |
debug_level | ebug_level |
Definition at line 134 of file phrase_tools.c.
DEBUG FUNCTION: print debugging informations for a statement stat.
comments | omments |
stat | tat |
debug_level | ebug_level |
Definition at line 111 of file phrase_tools.c.
Referenced by debug_control().
void debug_unstructured | ( | unstructured | an_unstructured, |
int | debug_level | ||
) |
DEBUG FUNCTION: print debugging informations for an unstructured an_unstructured.
f (ordering > 65535) ordering = ordering >> 16;
f (ordering > 65535) ordering = ordering >> 16;
f (ordering > 65535) ordering = ordering >> 16;
an_unstructured | n_unstructured |
debug_level | ebug_level |
Definition at line 146 of file phrase_tools.c.
First, set searched_string (we remove format information)
Reset list
fdebug(5) { pips_debug(5, "Searching statements with comments: %s\n", context.searched_string);
pips_debug(5, "In statement:\n");
print_statement(stat); }
comment_portion | omment_portion |
stat | tat |
Definition at line 481 of file phrase_tools.c.
statement make_assignement_statement | ( | entity | a_variable, |
expression | an_expression, | ||
statement | stat | ||
) |
Build and return new statement which is a assignement of variable a_variable with expression an_expression, with empty label, statement number and ordering of statement stat, and empty comments.
a_variable | _variable |
an_expression | n_expression |
stat | tat |
Definition at line 392 of file phrase_tools.c.
statement make_binary_call_statement | ( | const char * | operator_name, |
expression | expression1, | ||
expression | expression2, | ||
statement | stat | ||
) |
Build and return new statement which is a binary call with the 2 expressions expression1 and expression2, with empty label, statement number and ordering of statement stat, and empty comments.
operator_name | perator_name |
expression1 | xpression1 |
expression2 | xpression2 |
stat | tat |
Definition at line 354 of file phrase_tools.c.
Referenced by make_assignement_statement().
expression make_expression_from_entity | ( | entity | an_entity | ) |
This function build and return an expression given an entity an_entity.
entity make_variable_from_name_and_entity | ( | entity | cloned_variable, |
const char * | base_name, | ||
statement | stat, | ||
const char * | module_name | ||
) |
Build and return new entity obtained by cloning variable cloned_variable, with a name obtained by the concatenation of base_name and the statement ordering of statement stat.
If such entity already exist, increment statement ordering to get first free name. We assume then that created entity's name is unique.
cloned_variable | loned_variable |
base_name | ase_name |
stat | tat |
module_name | odule_name |
Definition at line 325 of file phrase_tools.c.
Return a list of references corresponding to a list of regions.
l_regions | _regions |
Definition at line 603 of file phrase_tools.c.
void replace_in_sequence_statement_with | ( | statement | old_stat, |
statement | new_stat, | ||
statement | root_stat | ||
) |
Replace statement old_stat by statement new_stat, asserting that this statement is contained in a sequence.
en_insert_after (new_stat, old_stat, stats_list); gen_remove (&stats_list, old_stat);
old_stat | ld_stat |
new_stat | ew_stat |
root_stat | oot_stat |
Definition at line 554 of file phrase_tools.c.
root_statement | oot_statement |
searched_stat | earched_stat |
Definition at line 536 of file phrase_tools.c.
Referenced by replace_in_sequence_statement_with(), and statement_is_contained_in_a_sequence_p().
void short_debug_unstructured | ( | unstructured | an_unstructured, |
int | debug_level | ||
) |
DEBUG FUNCTION: print debugging informations for an unstructured an_unstructured (short version)
an_unstructured | n_unstructured |
debug_level | ebug_level |
Definition at line 213 of file phrase_tools.c.
root_statement | oot_statement |
searched_stat | earched_stat |
Definition at line 507 of file phrase_tools.c.
DEBUG FUNCTION: return a string representing the type of the statement (SEQUENCE, CALL, etc...)
stat | tat |
Definition at line 65 of file phrase_tools.c.
Referenced by debug_statement().