156 if ((typeid(*first_type) == typeid(constant_int_type_name_c) && is_binary_type(second_type))) {return second_type;} |
156 if ((typeid(*first_type) == typeid(constant_int_type_name_c) && is_binary_type(second_type))) {return second_type;} |
157 if (is_real_type(first_type) && (typeid(*second_type) == typeid(constant_real_type_name_c))) {return first_type;} |
157 if (is_real_type(first_type) && (typeid(*second_type) == typeid(constant_real_type_name_c))) {return first_type;} |
158 if ((typeid(*first_type) == typeid(constant_real_type_name_c) && is_real_type(second_type))) {return second_type;} |
158 if ((typeid(*first_type) == typeid(constant_real_type_name_c) && is_real_type(second_type))) {return second_type;} |
159 return NULL; |
159 return NULL; |
160 } |
160 } |
161 |
161 |
162 private: |
162 #include "search_type_code.c" |
163 |
163 |
|
164 #if 0 |
164 void *compute_standard_function_st(function_invocation_c *symbol) { |
165 void *compute_standard_function_st(function_invocation_c *symbol) { |
165 #if 0 |
|
166 symbol_c *current_type = NULL; |
166 symbol_c *current_type = NULL; |
167 symbol_c *return_type = NULL; |
167 symbol_c *return_type = NULL; |
168 #endif |
|
169 |
168 |
170 function_type_t current_function_type = get_function_type((identifier_c *)symbol->function_name); |
169 function_type_t current_function_type = get_function_type((identifier_c *)symbol->function_name); |
171 function_call_param_iterator_c function_call_param_iterator(symbol); |
170 function_call_param_iterator_c function_call_param_iterator(symbol); |
172 search_expression_type_c* search_expression_type = this; |
171 search_expression_type_c* search_expression_type = this; |
173 #include "search_type_code.c" |
172 |
174 |
|
175 #if 0 |
|
176 for(int current_param = 0; current_param < ((list_c *)symbol->parameter_assignment_list)->n; current_param++) { |
173 for(int current_param = 0; current_param < ((list_c *)symbol->parameter_assignment_list)->n; current_param++) { |
177 symbol_c *param_name = NULL; |
174 symbol_c *param_name = NULL; |
178 switch (current_function_type) { |
175 switch (current_function_type) { |
179 case function_add: |
176 case function_add: |
180 case function_and: |
177 case function_and: |
257 break; |
254 break; |
258 default: ERROR; |
255 default: ERROR; |
259 } |
256 } |
260 } |
257 } |
261 return (void *)return_type; |
258 return (void *)return_type; |
262 #endif |
259 } |
263 |
|
264 } |
|
265 |
|
266 public: |
|
267 |
260 |
268 void *compute_standard_function_il(il_function_call_c *symbol, symbol_c *param_type) { |
261 void *compute_standard_function_il(il_function_call_c *symbol, symbol_c *param_type) { |
269 /*symbol_c *current_type = NULL;*/ |
262 /*symbol_c *current_type = NULL;*/ |
270 symbol_c *return_type = NULL; |
263 symbol_c *return_type = NULL; |
271 function_type_t current_function_type = get_function_type((identifier_c *)symbol->function_name); |
264 function_type_t current_function_type = get_function_type((identifier_c *)symbol->function_name); |