PIPS
|
Go to the source code of this file.
Variables | |
statement | flint_current_statement |
Warning! Do not modify this file that is automatically generated! More... | |
sometimes out...
la | a |
lt | t |
c | list of parameters |
Definition at line 222 of file flint_check.c.
References BOOL_UNDEF, call_function, call_intrinsic_p, CAR, entity_name, flint_message(), gen_last(), gen_length(), PARAMETER, parameter_type, and type_varargs_p.
Referenced by check_the_call().
be | e |
bp | p |
Definition at line 305 of file flint_check.c.
References basic_overloaded_p, basic_tag, basic_to_string(), call_function, entity_name, and flint_message().
Referenced by check_call_basic_and_dim(), and check_call_intrinsic().
bool check_call_basic_and_dim | ( | expression | exp, |
parameter | param, | ||
call | c, | ||
int | i | ||
) |
else
else
exp | xp |
param | aram |
Definition at line 367 of file flint_check.c.
References BOOL_UNDEF, check_call_basic(), check_call_dim(), exp, find_bd_expression(), and find_bd_parameter().
Referenced by check_call_one_type().
loose version
else
else
de | e |
dp | p |
Definition at line 336 of file flint_check.c.
References BOOL_UNDEF, call_function, entity_name, flint_message(), intptr_t, and number_of_elements().
Referenced by check_call_basic_and_dim(), and check_call_intrinsic().
FI: the last argument should be pure=TRUE since summary effects should not be touched
la | a |
lt | t |
the_fnct | he_fnct |
Definition at line 454 of file flint_check.c.
References CAR, CDR, check_call_one_mode(), db_get_memory_resource(), effects_to_list(), exp, EXPRESSION, gen_length(), list_undefined, module_local_name(), module_name(), ok, PARAMETER, and pips_debug.
bool check_call_one_mode | ( | expression | exp, |
parameter | param, | ||
entity | the_fnct, | ||
list | sefs_list, | ||
int | i | ||
) |
This function checks that a reference to a constant in a call may not be modified, if it could happen, a message is broadcast.
locally
else : control
exp | xp |
param | aram |
the_fnct | he_fnct |
sefs_list | efs_list |
Definition at line 499 of file flint_check.c.
References arg_const_p, CAR, CDR, EFFECT, effect_may_or_must_p, effect_to_name, effect_write_p, entity_name, exp, find_ith_formal_parameter(), flint_message(), and param_ref_p.
Referenced by check_call_mode_consistency().
bool check_call_one_type | ( | expression | exp, |
parameter | param, | ||
call | c, | ||
int | i | ||
) |
exp | xp |
param | aram |
Definition at line 287 of file flint_check.c.
References check_call_basic_and_dim(), and exp.
Referenced by check_call_types_compatibility().
la | a |
lt | t |
Definition at line 254 of file flint_check.c.
References CAR, check_call_one_type(), exp, EXPRESSION, gen_length(), ok, PARAMETER, and POP.
Referenced by check_the_call().
module | odule |
Definition at line 632 of file flint_check.c.
References CAR, CDR, check_one_common(), code_declarations, ENTITY, entity_initial, entity_is_a_common_p, module, special_common, and value_code.
Referenced by flinter().
local | ocal |
module | odule |
Definition at line 660 of file flint_check.c.
References area_layout, CAR, CDR, check_overlap_in_common(), ENDP, ENTITY, entity_local_name(), entity_module_name(), entity_name, entity_type, flint_message(), intptr_t, module, module_local_name(), pips_debug, position_in_the_area(), and type_area.
Referenced by check_commons().
bool check_overlap_in_common | ( | entity | the_common, |
entity | e1, | ||
int | inf1, | ||
int | sup1, | ||
entity | e2, | ||
int | inf2, | ||
int | sup2 | ||
) |
unused
testing overlap
else I must check basic compatibility
benefice du doute!
the_common | he_common |
e1 | 1 |
inf1 | nf1 |
sup1 | up1 |
e2 | 2 |
inf2 | nf2 |
sup2 | up2 |
Definition at line 735 of file flint_check.c.
References b1, b2, basic_complex_p, basic_float_p, basic_tag, entity_name, entity_type, find_bd_type_variable(), flint_message_2(), and module_local_name().
Referenced by check_one_common().
Definition at line 88 of file flint_check.c.
References BOOL_UNDEF, call_function, call_intrinsic_p, entity_name, entity_type, flint_message(), functional_result, type_functional, type_functional_p, and type_void_p.
Referenced by flint_instruction().
else
else
else
else
Errors in parameter modes are found out by effect computation. A second check, later, is meaningless.
return (check_call_mode_consistency(la, lt, the_fnct));
Definition at line 130 of file flint_check.c.
References BOOL_UNDEF, call_arguments, call_constant_p, call_function, call_intrinsic_p, check_call_args_number(), check_call_intrinsic(), check_call_types_compatibility(), entity_type, functional_parameters, gen_length(), type_functional, and type_functional_p.
Referenced by flint_call().
void check_the_reference | ( | reference | ref | ) |
ref | ef |
Definition at line 396 of file flint_check.c.
References base, basic_overloaded_p, CAR, CDR, control_type_in_expression(), entity_local_name(), entity_type, EXPRESSION, find_bd_type_variable(), flint_message(), gen_length(), is_basic_int, is_basic_overloaded, ok, ref, reference_indices, and reference_variable.
Referenced by flint_reference().
bool control_type_in_expression | ( | enum | basic_utype, |
int | , | ||
expression | |||
) |
base | ase |
dims | ims |
Definition at line 191 of file flint_utils.c.
References base, call_function, entity_type, find_bd_type_variable(), flint_message(), functional_result, type_functional, and type_functional_p.
Referenced by find_bd_expression().
bool find_bd_expression | ( | expression | exp, |
basic * | base, | ||
list * | dims | ||
) |
exp | xp |
base | ase |
dims | ims |
Definition at line 141 of file flint_utils.c.
References base, exp, expression_syntax, FATAL, find_bd_call(), find_bd_reference(), flint_message(), is_syntax_call, is_syntax_range, is_syntax_reference, syntax_call, syntax_reference, and syntax_tag.
Referenced by check_call_basic_and_dim(), check_call_intrinsic(), and control_type_in_expression().
param | aram |
base | ase |
dims | ims |
Definition at line 116 of file flint_utils.c.
References base, find_bd_type_variable(), and parameter_type.
Referenced by check_call_basic_and_dim().
ref | ef |
base | ase |
dims | ims |
Definition at line 167 of file flint_utils.c.
References base, CDR, entity_type, find_bd_type_variable(), gen_length(), ok, ref, reference_indices, and reference_variable.
Referenced by find_bd_expression().
tp | p |
base | ase |
dims | ims |
Definition at line 125 of file flint_utils.c.
References base, flint_message(), type_variable, type_variable_p, variable_basic, and variable_dimensions.
Referenced by check_overlap_in_common(), check_the_reference(), find_bd_call(), find_bd_parameter(), find_bd_reference(), and position_in_the_area().
This function checks the syntax of a call and recursively.
verifies its arguments
Definition at line 74 of file flint_walk.c.
References call_arguments, check_the_call(), flint_cons_actual_argument(), and gen_mapl().
Referenced by flint_instruction(), and flint_syntax().
void flint_cons_actual_argument | ( | list | pc | ) |
An array actual argument may have no indices
pc | c |
Definition at line 158 of file flint_walk.c.
References CAR, EXPRESSION, expression_reference(), expression_reference_p(), flint_expression(), gen_length(), and reference_indices.
Referenced by flint_call().
void flint_cons_dimension | ( | list | pc | ) |
extern char *current_module_name; unused and changed These two functions deal with the boundaries of finite
arrays, verifying their definition as expressions
pc | c |
Definition at line 52 of file flint_walk.c.
References CAR, DIMENSION, and flint_dimension().
void flint_cons_expression | ( | list | pc | ) |
These two functions operate on the list of expressions
pc | c |
Definition at line 150 of file flint_walk.c.
References CAR, EXPRESSION, and flint_expression().
Referenced by flint_reference().
void flint_cons_statement | ( | list | pc | ) |
pc | c |
Definition at line 269 of file flint_walk.c.
References CAR, flint_statement(), and STATEMENT.
Referenced by flint_instruction().
Definition at line 58 of file flint_walk.c.
References dimension_lower, dimension_upper, and flint_expression().
Referenced by flint_cons_dimension().
expression flint_expression | ( | expression | e | ) |
Definition at line 174 of file flint_walk.c.
References expression_syntax, and flint_syntax().
Referenced by flint_cons_actual_argument(), flint_cons_expression(), flint_dimension(), flint_range(), and flint_test().
instruction flint_instruction | ( | instruction | i | ) |
Verification of an instruction with branching according
to its subclass as defined in the data structure
Definition at line 217 of file flint_walk.c.
References check_procedure(), FATAL, flint_call(), flint_cons_statement(), flint_loop(), flint_test(), flint_unstructured(), gen_mapl(), instruction_block, instruction_call, instruction_loop, instruction_tag, instruction_test, instruction_unstructured, is_instruction_block, is_instruction_call, is_instruction_goto, is_instruction_loop, is_instruction_test, and is_instruction_unstructured.
Referenced by flint_statement().
Recursive verification of a loop as (range)+(expression)
Definition at line 186 of file flint_walk.c.
References flint_range(), flint_statement(), loop_body, and loop_range.
Referenced by flint_instruction().
void flint_message | ( | char * | fun, |
char * | fmt, | ||
... | |||
) |
print out remainder of message
fun | un |
fmt | mt |
Definition at line 147 of file flint.c.
References flint_current_module_name, flint_current_statement, flint_messages_file, fprintf(), no_message, number_of_messages, ORDERING_NUMBER, ORDERING_STATEMENT, statement_number, and statement_ordering.
Referenced by check_call_args_number(), check_call_basic(), check_call_dim(), check_call_one_mode(), check_one_common(), check_procedure(), check_the_reference(), control_type_in_expression(), find_bd_call(), find_bd_expression(), and find_bd_type_variable().
void flint_message_2 | ( | char * | fun, |
char * | fmt, | ||
... | |||
) |
Same as flint_message but without the function name
print out remainder of message
fun | un |
fmt | mt |
Definition at line 183 of file flint.c.
References flint_current_module_name, flint_messages_file, fprintf(), no_message, and number_of_messages.
Referenced by check_overlap_in_common().
This function verifies that incremented or decremented
loop(for) indices do not overflow or underflow their
limits
Definition at line 90 of file flint_walk.c.
References flint_expression(), range_increment, range_lower, and range_upper.
Referenced by flint_loop(), and flint_syntax().
A reference is used when given a function the address of.
an element instead of its value.
Definition at line 107 of file flint_walk.c.
References check_the_reference(), flint_cons_expression(), gen_mapl(), and reference_indices.
Referenced by flint_syntax().
Definition at line 278 of file flint_walk.c.
References flint_current_statement, flint_instruction(), and statement_instruction.
Referenced by flint_cons_statement(), flint_loop(), flint_test(), flint_unstructured(), and flinter().
void flint_syntax | ( | syntax | s | ) |
verification of syntaxes
branch according to the syntax subclass
Definition at line 121 of file flint_walk.c.
References FATAL, flint_call(), flint_range(), flint_reference(), is_syntax_call, is_syntax_range, is_syntax_reference, syntax_call, syntax_range, syntax_reference, and syntax_tag.
Referenced by flint_expression().
A test is taken as (expression)+(statement)+(statement)
Definition at line 200 of file flint_walk.c.
References flint_expression(), flint_statement(), test_condition, test_false, and test_true.
Referenced by flint_instruction().
dependence_graph | ependence_graph |
module_stat | odule_stat |
Definition at line 210 of file uninitialized_variables.c.
References dependence_graph, flint_check_uninitialized_variables_in_statement(), flint_free_statement_def_use_variables(), flint_initialize_statement_def_use_variables(), flint_no_uninitialized_variable_ouput_yet, gen_null(), gen_recurse, raw_flint_message(), and statement_domain.
Referenced by flinter().
void flint_unstructured | ( | unstructured | u | ) |
Definition at line 257 of file flint_walk.c.
References CONTROL_MAP, control_statement, flint_statement(), gen_free_list(), NIL, and unstructured_control.
Referenced by flint_instruction().
bool flinter | ( | const | string | ) |
Routine of global module verification
user_error() is not used in flint, no need for an exception handler
Getting parsed code of module
the last parameter should be pure=true; the code should not be modified!
Resource to trace uninitialized variables:
what is done
checking commons
checking syntax
final message
Should have worked:
string | odule_name |
Definition at line 54 of file flint.c.
References check_commons(), concatenate(), db_build_file_resource_name(), db_get_current_workspace_directory(), db_get_memory_resource(), DB_PUT_FILE_RESOURCE, debug(), debug_off, debug_on, dependence_graph, flint_current_module_name, flint_current_statement, flint_messages_file, flint_statement(), flint_uninitialized_variables(), fprintf(), free(), local_name_to_top_level_entity(), module, module_name(), no_message, number_of_messages, pips_debug, reset_current_module_entity(), reset_current_module_statement(), reset_ordering_to_statement(), reset_proper_rw_effects(), safe_fclose(), safe_fopen(), set_current_module_entity(), set_current_module_statement(), set_ordering_to_statement(), set_proper_rw_effects(), statement_undefined, and strdup().
module | odule |
Definition at line 543 of file flint_check.c.
References area_layout, CAR, CDR, code_declarations, ENTITY, entity_initial, entity_name, entity_storage, entity_type, fprintf(), module, ram_offset, special_common, storage_ram, type_area, type_area_p, and value_code.
ld | d |
the_result | he_result |
Definition at line 50 of file flint_utils.c.
References CAR, CDR, DIMENSION, intptr_t, ok, and size_of_dimension().
Referenced by check_call_dim(), control_type_in_expression(), make_emulated_shared_variable(), and position_in_the_area().
the_var | he_var |
inf | nf |
sup | up |
Definition at line 580 of file flint_check.c.
References base, basic_complex, basic_complex_p, basic_float, basic_float_p, basic_int, basic_int_p, basic_logical, basic_logical_p, basic_tag, entity_storage, entity_type, find_bd_type_variable(), intptr_t, is_basic_complex, is_basic_float, is_basic_int, is_basic_logical, number_of_elements(), pips_internal_error, ram_offset, and storage_ram.
Referenced by check_one_common().
void raw_flint_message | ( | bool | count, |
char * | fmt, | ||
... | |||
) |
Same as flint_message but a bare bones version
count is used to decide if we count tjis message or not.
count | ount |
fmt | mt |
Definition at line 211 of file flint.c.
References count, flint_messages_file, no_message, and number_of_messages.
Referenced by flint_check_uninitialized_variables_in_statement(), and flint_uninitialized_variables().
this function computes the size of a dimension.
else
the_int | he_int |
Definition at line 71 of file flint_utils.c.
References dimension_lower, dimension_upper, expression_integer_value(), and intptr_t.
Referenced by number_of_elements().
|
extern |
Warning! Do not modify this file that is automatically generated!
cproto-generated files
Modify src/Libs/flint/flint-local.h instead, to add your own modifications. header file built by cproto flint-local.h
Warning! Do not modify this file that is automatically generated!