stage4/generate_c/generate_c_st.cc
changeset 721 5dc33058e041
parent 718 a9f8cc778444
child 762 a3d917474ae4
equal deleted inserted replaced
720:f637ac331a68 721:5dc33058e041
   709       }
   709       }
   710     }
   710     }
   711   }
   711   }
   712 
   712 
   713   /* Check whether we are calling an overloaded function! */
   713   /* Check whether we are calling an overloaded function! */
   714   /* (fdecl_mutiplicity==2)  => calling overloaded function */
   714   /* (fdecl_mutiplicity > 1)  => calling overloaded function */
   715   int fdecl_mutiplicity =  function_symtable.multiplicity(symbol->function_name);
   715   int fdecl_mutiplicity =  function_symtable.count(symbol->function_name);
   716   if (fdecl_mutiplicity == 0) ERROR;
   716   if (fdecl_mutiplicity == 0) ERROR;
   717 
   717 
   718   if (has_output_params) {
   718   if (has_output_params) {
   719     fcall_number++;
   719     fcall_number++;
   720     s4o.print("__");
   720     s4o.print("__");
   721     fbname->accept(*this);
   721     fbname->accept(*this);
   722     s4o.print("_");
   722     s4o.print("_");
   723     function_name->accept(*this);
   723     function_name->accept(*this);
   724     if (fdecl_mutiplicity == 2) {
   724     if (fdecl_mutiplicity > 1) {
   725       /* function being called is overloaded! */
   725       /* function being called is overloaded! */
   726       s4o.print("__");
   726       s4o.print("__");
   727       print_function_parameter_data_types_c overloaded_func_suf(&s4o);
   727       print_function_parameter_data_types_c overloaded_func_suf(&s4o);
   728       f_decl->accept(overloaded_func_suf);
   728       f_decl->accept(overloaded_func_suf);
   729     }
   729     }
   730     s4o.print(fcall_number);
   730     s4o.print(fcall_number);
   731   }
   731   }
   732   else {
   732   else {
   733     function_name->accept(*this);
   733     function_name->accept(*this);
   734     if (fdecl_mutiplicity == 2) {
   734     if (fdecl_mutiplicity > 1) {
   735       /* function being called is overloaded! */
   735       /* function being called is overloaded! */
   736       s4o.print("__");
   736       s4o.print("__");
   737       print_function_parameter_data_types_c overloaded_func_suf(&s4o);
   737       print_function_parameter_data_types_c overloaded_func_suf(&s4o);
   738       f_decl->accept(overloaded_func_suf);
   738       f_decl->accept(overloaded_func_suf);
   739     }
   739     }