37 #include "datatype_functions.hh" |
37 #include "datatype_functions.hh" |
38 |
38 |
39 class narrow_candidate_datatypes_c: public iterator_visitor_c { |
39 class narrow_candidate_datatypes_c: public iterator_visitor_c { |
40 |
40 |
41 private: |
41 private: |
42 symbol_c * selected_datatype; |
|
43 search_varfb_instance_type_c *search_varfb_instance_type; |
42 search_varfb_instance_type_c *search_varfb_instance_type; |
44 search_base_type_c search_base_type; |
43 search_base_type_c search_base_type; |
45 symbol_c *case_expression_type; |
|
46 symbol_c *il_operand; |
44 symbol_c *il_operand; |
47 symbol_c *prev_il_instruction; |
45 symbol_c *prev_il_instruction; |
48 |
46 |
49 bool is_widening_compatible(symbol_c *left_type, symbol_c *right_type, symbol_c *result_type, const struct widen_entry widen_table[]); |
47 bool is_widening_compatible(symbol_c *left_type, symbol_c *right_type, symbol_c *result_type, const struct widen_entry widen_table[]); |
50 |
48 |
51 void narrow_function_invocation(symbol_c *f_call, generic_function_call_t fcall_data); |
49 void narrow_function_invocation(symbol_c *f_call, generic_function_call_t fcall_data); |
52 void narrow_nonformal_call(symbol_c *f_call, symbol_c *f_decl, int *ext_parm_count = NULL); |
50 void narrow_nonformal_call(symbol_c *f_call, symbol_c *f_decl, int *ext_parm_count = NULL); |
53 void narrow_formal_call(symbol_c *f_call, symbol_c *f_decl, int *ext_parm_count = NULL); |
51 void narrow_formal_call(symbol_c *f_call, symbol_c *f_decl, int *ext_parm_count = NULL); |
|
52 |
|
53 void *handle_il_instruction(symbol_c *symbol); |
54 |
54 |
55 public: |
55 public: |
56 narrow_candidate_datatypes_c(symbol_c *ignore); |
56 narrow_candidate_datatypes_c(symbol_c *ignore); |
57 virtual ~narrow_candidate_datatypes_c(void); |
57 virtual ~narrow_candidate_datatypes_c(void); |
58 |
58 |
63 /**********************/ |
63 /**********************/ |
64 /********************************/ |
64 /********************************/ |
65 /* B 1.3.3 - Derived data types */ |
65 /* B 1.3.3 - Derived data types */ |
66 /********************************/ |
66 /********************************/ |
67 void *visit(subrange_c *symbol); |
67 void *visit(subrange_c *symbol); |
|
68 void *visit(simple_spec_init_c *symbol); |
68 |
69 |
69 /*********************/ |
70 /*********************/ |
70 /* B 1.4 - Variables */ |
71 /* B 1.4 - Variables */ |
71 /*********************/ |
72 /*********************/ |
72 /********************************************/ |
73 /********************************************/ |
74 /********************************************/ |
75 /********************************************/ |
75 /*************************************/ |
76 /*************************************/ |
76 /* B 1.4.2 - Multi-element variables */ |
77 /* B 1.4.2 - Multi-element variables */ |
77 /*************************************/ |
78 /*************************************/ |
78 void *visit(array_variable_c *symbol); |
79 void *visit(array_variable_c *symbol); |
|
80 void *visit(il_instruction_c *symbol); |
79 void *visit(subscript_list_c *symbol); |
81 void *visit(subscript_list_c *symbol); |
80 |
82 |
81 /**************************************/ |
83 /**************************************/ |
82 /* B 1.5 - Program organization units */ |
84 /* B 1.5 - Program organization units */ |
83 /**************************************/ |
85 /**************************************/ |
104 /* B.2 - Language IL (Instruction List) */ |
106 /* B.2 - Language IL (Instruction List) */ |
105 /****************************************/ |
107 /****************************************/ |
106 /***********************************/ |
108 /***********************************/ |
107 /* B 2.1 Instructions and Operands */ |
109 /* B 2.1 Instructions and Operands */ |
108 /***********************************/ |
110 /***********************************/ |
109 // void *visit(instruction_list_c *symbol); |
111 void *visit(instruction_list_c *symbol); |
110 void *visit(il_simple_operation_c *symbol); |
112 void *visit(il_simple_operation_c *symbol); |
111 void *visit(il_function_call_c *symbol); |
113 void *visit(il_function_call_c *symbol); |
112 void *visit(il_expression_c *symbol); |
114 void *visit(il_expression_c *symbol); |
113 void *visit(il_fb_call_c *symbol); |
115 void *visit(il_fb_call_c *symbol); |
114 void *visit(il_formal_funct_call_c *symbol); |
116 void *visit(il_formal_funct_call_c *symbol); |