equal
deleted
inserted
replaced
607 ERROR; |
607 ERROR; |
608 return NULL; |
608 return NULL; |
609 } |
609 } |
610 |
610 |
611 void *visit(function_invocation_c *symbol) { |
611 void *visit(function_invocation_c *symbol) { |
612 symbol_c* function_type_prefix = NULL; |
|
613 symbol_c* function_name = NULL; |
612 symbol_c* function_name = NULL; |
614 symbol_c* function_type_suffix = NULL; |
|
615 DECLARE_PARAM_LIST() |
613 DECLARE_PARAM_LIST() |
616 |
614 |
617 symbol_c *parameter_assignment_list = NULL; |
615 symbol_c *parameter_assignment_list = NULL; |
618 if (NULL != symbol-> formal_param_list) parameter_assignment_list = symbol-> formal_param_list; |
616 if (NULL != symbol-> formal_param_list) parameter_assignment_list = symbol-> formal_param_list; |
619 if (NULL != symbol->nonformal_param_list) parameter_assignment_list = symbol->nonformal_param_list; |
617 if (NULL != symbol->nonformal_param_list) parameter_assignment_list = symbol->nonformal_param_list; |
722 /* Check whether we are calling an overloaded function! */ |
720 /* Check whether we are calling an overloaded function! */ |
723 /* (fdecl_mutiplicity==2) => calling overloaded function */ |
721 /* (fdecl_mutiplicity==2) => calling overloaded function */ |
724 int fdecl_mutiplicity = function_symtable.multiplicity(symbol->function_name); |
722 int fdecl_mutiplicity = function_symtable.multiplicity(symbol->function_name); |
725 if (fdecl_mutiplicity == 0) ERROR; |
723 if (fdecl_mutiplicity == 0) ERROR; |
726 |
724 |
727 if (function_type_prefix != NULL) { |
|
728 s4o.print("("); |
|
729 search_expression_type->default_literal_type(function_type_prefix)->accept(*this); |
|
730 s4o.print(")"); |
|
731 } |
|
732 if (function_type_suffix != NULL) { |
|
733 function_type_suffix = search_expression_type->default_literal_type(function_type_suffix); |
|
734 } |
|
735 if (has_output_params) { |
725 if (has_output_params) { |
736 fcall_number++; |
726 fcall_number++; |
737 s4o.print("__"); |
727 s4o.print("__"); |
738 fbname->accept(*this); |
728 fbname->accept(*this); |
739 s4o.print("_"); |
729 s4o.print("_"); |
742 /* function being called is overloaded! */ |
732 /* function being called is overloaded! */ |
743 s4o.print("__"); |
733 s4o.print("__"); |
744 print_function_parameter_data_types_c overloaded_func_suf(&s4o); |
734 print_function_parameter_data_types_c overloaded_func_suf(&s4o); |
745 f_decl->accept(overloaded_func_suf); |
735 f_decl->accept(overloaded_func_suf); |
746 } |
736 } |
747 if (function_type_suffix != NULL) |
|
748 function_type_suffix->accept(*this); |
|
749 s4o.print_integer(fcall_number); |
737 s4o.print_integer(fcall_number); |
750 } |
738 } |
751 else { |
739 else { |
752 function_name->accept(*this); |
740 function_name->accept(*this); |
753 if (fdecl_mutiplicity == 2) { |
741 if (fdecl_mutiplicity == 2) { |
754 /* function being called is overloaded! */ |
742 /* function being called is overloaded! */ |
755 s4o.print("__"); |
743 s4o.print("__"); |
756 print_function_parameter_data_types_c overloaded_func_suf(&s4o); |
744 print_function_parameter_data_types_c overloaded_func_suf(&s4o); |
757 f_decl->accept(overloaded_func_suf); |
745 f_decl->accept(overloaded_func_suf); |
758 } |
746 } |
759 if (function_type_suffix != NULL) |
|
760 function_type_suffix->accept(*this); |
|
761 } |
747 } |
762 s4o.print("("); |
748 s4o.print("("); |
763 s4o.indent_right(); |
749 s4o.indent_right(); |
764 |
750 |
765 int nb_param = 0; |
751 int nb_param = 0; |