equal
deleted
inserted
replaced
51 * In this class, the datatype of '0' will be set to the same datatype as the 'foo' variable. |
51 * In this class, the datatype of '0' will be set to the same datatype as the 'foo' variable. |
52 * If the intersection of the candidate datatype lists of the left and right side expressions is empty, |
52 * If the intersection of the candidate datatype lists of the left and right side expressions is empty, |
53 * then a datatype error has been found, and the datatype is either left at NULL, or set to a pointer of an invalid_type_name_c object! |
53 * then a datatype error has been found, and the datatype is either left at NULL, or set to a pointer of an invalid_type_name_c object! |
54 */ |
54 */ |
55 |
55 |
|
56 #ifndef _NARROW_CANDIDATE_DATATYPES_HH |
|
57 #define _NARROW_CANDIDATE_DATATYPES_HH |
|
58 |
|
59 |
56 |
60 |
57 #include "../absyntax_utils/absyntax_utils.hh" |
61 #include "../absyntax_utils/absyntax_utils.hh" |
58 #include "datatype_functions.hh" |
62 #include "datatype_functions.hh" |
59 |
63 |
60 class narrow_candidate_datatypes_c: public iterator_visitor_c { |
64 class narrow_candidate_datatypes_c: public iterator_visitor_c { |
62 private: |
66 private: |
63 search_varfb_instance_type_c *search_varfb_instance_type; |
67 search_varfb_instance_type_c *search_varfb_instance_type; |
64 search_base_type_c search_base_type; |
68 search_base_type_c search_base_type; |
65 symbol_c *il_operand; |
69 symbol_c *il_operand; |
66 il_instruction_c *fake_prev_il_instruction; |
70 il_instruction_c *fake_prev_il_instruction; |
67 std::vector <symbol_c *> *prev_il_instructions; |
|
68 std::vector <symbol_c *> *prev_il_instructions_intersected_datatypes; |
|
69 |
71 |
70 bool is_widening_compatible(const struct widen_entry widen_table[], symbol_c *left_type, symbol_c *right_type, symbol_c *result_type, bool *deprecated_status = NULL); |
72 bool is_widening_compatible(const struct widen_entry widen_table[], symbol_c *left_type, symbol_c *right_type, symbol_c *result_type, bool *deprecated_status = NULL); |
71 |
73 |
72 void narrow_function_invocation(symbol_c *f_call, generic_function_call_t fcall_data); |
74 void narrow_function_invocation(symbol_c *f_call, generic_function_call_t fcall_data); |
73 void narrow_nonformal_call(symbol_c *f_call, symbol_c *f_decl, int *ext_parm_count = NULL); |
75 void narrow_nonformal_call(symbol_c *f_call, symbol_c *f_decl, int *ext_parm_count = NULL); |
263 }; // narrow_candidate_datatypes_c |
265 }; // narrow_candidate_datatypes_c |
264 |
266 |
265 |
267 |
266 |
268 |
267 |
269 |
268 |
270 #endif // #ifndef _NARROW_CANDIDATE_DATATYPES_HH |
269 |
271 |
270 |
272 |
271 |
273 |