stage4/generate_c/st_code_gen.c
changeset 210 8387cac2aba6
parent 208 c72748a12ae3
child 217 f5dfadf5de54
equal deleted inserted replaced
209:30cbae46190d 210:8387cac2aba6
 16526                                 /*Function specific CODE */
 16526                                 /*Function specific CODE */
 16527                                 ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
 16527                                 ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
 16528                             }
 16528                             }
 16529                             
 16529                             
 16530                         }while(param_value != NULL);
 16530                         }while(param_value != NULL);
 16531                         symbol_c * return_type_symbol = last_type_symbol;
 16531                         symbol_c * return_type_symbol;
       
 16532                         if (search_expression_type->is_literal_integer_type(last_type_symbol))
       
 16533                             return_type_symbol = &search_constant_type_c::lint_type_name;
       
 16534                         else if (search_expression_type->is_literal_real_type(last_type_symbol))
       
 16535                             return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 16536                         else
       
 16537                             return_type_symbol = last_type_symbol;
 16532                         function_type_suffix = return_type_symbol;
 16538                         function_type_suffix = return_type_symbol;
 16533                         break;
 16539                         break;
 16534                         
 16540                         
 16535                     }
 16541                     }
 16536                     
 16542                     
 16744                                 /*Function specific CODE */
 16750                                 /*Function specific CODE */
 16745                                 ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
 16751                                 ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
 16746                             }
 16752                             }
 16747                             
 16753                             
 16748                         }while(param_value != NULL);
 16754                         }while(param_value != NULL);
 16749                         symbol_c * return_type_symbol = last_type_symbol;
 16755                         symbol_c * return_type_symbol;
       
 16756                         if (search_expression_type->is_literal_integer_type(last_type_symbol))
       
 16757                             return_type_symbol = &search_constant_type_c::lint_type_name;
       
 16758                         else if (search_expression_type->is_literal_real_type(last_type_symbol))
       
 16759                             return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 16760                         else
       
 16761                             return_type_symbol = last_type_symbol;
 16750                         function_type_suffix = return_type_symbol;
 16762                         function_type_suffix = return_type_symbol;
 16751                         break;
 16763                         break;
 16752                         
 16764                         
 16753                     }
 16765                     }
 16754                     
 16766                     
 16853                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
 16865                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
 16854                         
 16866                         
 16855                         if (IN2_type_symbol == NULL)
 16867                         if (IN2_type_symbol == NULL)
 16856                           IN2_type_symbol = last_type_symbol;
 16868                           IN2_type_symbol = last_type_symbol;
 16857                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
 16869                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
 16858                         symbol_c * return_type_symbol = last_type_symbol;
 16870                         symbol_c * return_type_symbol;
       
 16871                         if (search_expression_type->is_literal_integer_type(last_type_symbol))
       
 16872                             return_type_symbol = &search_constant_type_c::lint_type_name;
       
 16873                         else if (search_expression_type->is_literal_real_type(last_type_symbol))
       
 16874                             return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 16875                         else
       
 16876                             return_type_symbol = last_type_symbol;
 16859                         function_type_suffix = return_type_symbol;
 16877                         function_type_suffix = return_type_symbol;
 16860                         break;
 16878                         break;
 16861                         
 16879                         
 16862                     }
 16880                     }
 16863                     
 16881                     
 17116                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
 17134                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
 17117                         
 17135                         
 17118                         if (IN2_type_symbol == NULL)
 17136                         if (IN2_type_symbol == NULL)
 17119                           IN2_type_symbol = last_type_symbol;
 17137                           IN2_type_symbol = last_type_symbol;
 17120                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
 17138                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
 17121                         symbol_c * return_type_symbol = last_type_symbol;
 17139                         symbol_c * return_type_symbol;
       
 17140                         if (search_expression_type->is_literal_integer_type(last_type_symbol))
       
 17141                             return_type_symbol = &search_constant_type_c::lint_type_name;
       
 17142                         else if (search_expression_type->is_literal_real_type(last_type_symbol))
       
 17143                             return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 17144                         else
       
 17145                             return_type_symbol = last_type_symbol;
 17122                         function_type_suffix = return_type_symbol;
 17146                         function_type_suffix = return_type_symbol;
 17123                         break;
 17147                         break;
 17124                         
 17148                         
 17125                     }
 17149                     }
 17126                     
 17150                     
 17225                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
 17249                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
 17226                         
 17250                         
 17227                         if (IN2_type_symbol == NULL)
 17251                         if (IN2_type_symbol == NULL)
 17228                           IN2_type_symbol = last_type_symbol;
 17252                           IN2_type_symbol = last_type_symbol;
 17229                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
 17253                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
 17230                         symbol_c * return_type_symbol = last_type_symbol;
 17254                         symbol_c * return_type_symbol;
       
 17255                         if (search_expression_type->is_literal_integer_type(last_type_symbol))
       
 17256                             return_type_symbol = &search_constant_type_c::lint_type_name;
       
 17257                         else if (search_expression_type->is_literal_real_type(last_type_symbol))
       
 17258                             return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 17259                         else
       
 17260                             return_type_symbol = last_type_symbol;
 17231                         function_type_suffix = return_type_symbol;
 17261                         function_type_suffix = return_type_symbol;
 17232                         break;
 17262                         break;
 17233                         
 17263                         
 17234                     }
 17264                     }
 17235                     
 17265                     
 17294                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
 17324                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
 17295                         
 17325                         
 17296                         if (IN2_type_symbol == NULL)
 17326                         if (IN2_type_symbol == NULL)
 17297                           IN2_type_symbol = last_type_symbol;
 17327                           IN2_type_symbol = last_type_symbol;
 17298                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
 17328                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
 17299                         symbol_c * return_type_symbol = last_type_symbol;
 17329                         symbol_c * return_type_symbol;
       
 17330                         if (search_expression_type->is_literal_integer_type(last_type_symbol))
       
 17331                             return_type_symbol = &search_constant_type_c::lint_type_name;
       
 17332                         else if (search_expression_type->is_literal_real_type(last_type_symbol))
       
 17333                             return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 17334                         else
       
 17335                             return_type_symbol = last_type_symbol;
 17300                         function_type_suffix = IN1_type_symbol;
 17336                         function_type_suffix = IN1_type_symbol;
 17301                         break;
 17337                         break;
 17302                         
 17338                         
 17303                     }
 17339                     }
 17304                     
 17340                     
 17342                 function_name = (symbol_c*)(new pragma_c("__move_"));
 17378                 function_name = (symbol_c*)(new pragma_c("__move_"));
 17343                 
 17379                 
 17344                 if (IN_type_symbol == NULL)
 17380                 if (IN_type_symbol == NULL)
 17345                   IN_type_symbol = last_type_symbol;
 17381                   IN_type_symbol = last_type_symbol;
 17346                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
 17382                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
 17347                 symbol_c * return_type_symbol = last_type_symbol;
 17383                 symbol_c * return_type_symbol;
       
 17384                 if (search_expression_type->is_literal_integer_type(last_type_symbol))
       
 17385                     return_type_symbol = &search_constant_type_c::lint_type_name;
       
 17386                 else if (search_expression_type->is_literal_real_type(last_type_symbol))
       
 17387                     return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 17388                 else
       
 17389                     return_type_symbol = last_type_symbol;
 17348                 function_type_suffix = return_type_symbol;
 17390                 function_type_suffix = return_type_symbol;
 17349                 break;
 17391                 break;
 17350                 
 17392                 
 17351             }
 17393             }
 17352             
 17394             
 17710                                 /*Function specific CODE */
 17752                                 /*Function specific CODE */
 17711                                 ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
 17753                                 ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
 17712                             }
 17754                             }
 17713                             
 17755                             
 17714                         }while(param_value != NULL);
 17756                         }while(param_value != NULL);
 17715                         symbol_c * return_type_symbol = last_type_symbol;
 17757                         symbol_c * return_type_symbol;
       
 17758                         if (search_expression_type->is_literal_integer_type(last_type_symbol))
       
 17759                             return_type_symbol = &search_constant_type_c::lword_type_name;
       
 17760                         else
       
 17761                             return_type_symbol = last_type_symbol;
 17716                         function_type_suffix = return_type_symbol;
 17762                         function_type_suffix = return_type_symbol;
 17717                         break;
 17763                         break;
 17718                         
 17764                         
 17719                     }
 17765                     }
 17720                     
 17766                     
 17808                                 /*Function specific CODE */
 17854                                 /*Function specific CODE */
 17809                                 ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
 17855                                 ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
 17810                             }
 17856                             }
 17811                             
 17857                             
 17812                         }while(param_value != NULL);
 17858                         }while(param_value != NULL);
 17813                         symbol_c * return_type_symbol = last_type_symbol;
 17859                         symbol_c * return_type_symbol;
       
 17860                         if (search_expression_type->is_literal_integer_type(last_type_symbol))
       
 17861                             return_type_symbol = &search_constant_type_c::lword_type_name;
       
 17862                         else
       
 17863                             return_type_symbol = last_type_symbol;
 17814                         function_type_suffix = return_type_symbol;
 17864                         function_type_suffix = return_type_symbol;
 17815                         break;
 17865                         break;
 17816                         
 17866                         
 17817                     }
 17867                     }
 17818                     
 17868                     
 17906                                 /*Function specific CODE */
 17956                                 /*Function specific CODE */
 17907                                 ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
 17957                                 ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
 17908                             }
 17958                             }
 17909                             
 17959                             
 17910                         }while(param_value != NULL);
 17960                         }while(param_value != NULL);
 17911                         symbol_c * return_type_symbol = last_type_symbol;
 17961                         symbol_c * return_type_symbol;
       
 17962                         if (search_expression_type->is_literal_integer_type(last_type_symbol))
       
 17963                             return_type_symbol = &search_constant_type_c::lword_type_name;
       
 17964                         else
       
 17965                             return_type_symbol = last_type_symbol;
 17912                         function_type_suffix = return_type_symbol;
 17966                         function_type_suffix = return_type_symbol;
 17913                         break;
 17967                         break;
 17914                         
 17968                         
 17915                     }
 17969                     }
 17916                     
 17970                     
 18038                                 ADD_PARAM_LIST(IN0_param_value, IN0_type_symbol, function_param_iterator_c::direction_in)
 18092                                 ADD_PARAM_LIST(IN0_param_value, IN0_type_symbol, function_param_iterator_c::direction_in)
 18039                                 
 18093                                 
 18040                                 if (IN1_type_symbol == NULL)
 18094                                 if (IN1_type_symbol == NULL)
 18041                                   IN1_type_symbol = last_type_symbol;
 18095                                   IN1_type_symbol = last_type_symbol;
 18042                                 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
 18096                                 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
 18043                                 symbol_c * return_type_symbol = last_type_symbol;
 18097                                 symbol_c * return_type_symbol;
       
 18098                                 if (search_expression_type->is_literal_integer_type(last_type_symbol))
       
 18099                                     return_type_symbol = &search_constant_type_c::lint_type_name;
       
 18100                                 else if (search_expression_type->is_literal_real_type(last_type_symbol))
       
 18101                                     return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 18102                                 else
       
 18103                                     return_type_symbol = last_type_symbol;
 18044                                 function_type_suffix = IN0_type_symbol;
 18104                                 function_type_suffix = IN0_type_symbol;
 18045                                 break;
 18105                                 break;
 18046                                 
 18106                                 
 18047                             }
 18107                             }
 18048                             
 18108                             
 18142                                 /*Function specific CODE */
 18202                                 /*Function specific CODE */
 18143                                 ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
 18203                                 ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
 18144                             }
 18204                             }
 18145                             
 18205                             
 18146                         }while(param_value != NULL);
 18206                         }while(param_value != NULL);
 18147                         symbol_c * return_type_symbol = last_type_symbol;
 18207                         symbol_c * return_type_symbol;
       
 18208                         if (search_expression_type->is_literal_integer_type(last_type_symbol))
       
 18209                             return_type_symbol = &search_constant_type_c::lint_type_name;
       
 18210                         else if (search_expression_type->is_literal_real_type(last_type_symbol))
       
 18211                             return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 18212                         else
       
 18213                             return_type_symbol = last_type_symbol;
 18148                         function_type_suffix = return_type_symbol;
 18214                         function_type_suffix = return_type_symbol;
 18149                         break;
 18215                         break;
 18150                         
 18216                         
 18151                     }
 18217                     }
 18152                     
 18218                     
 18240                                 /*Function specific CODE */
 18306                                 /*Function specific CODE */
 18241                                 ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
 18307                                 ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
 18242                             }
 18308                             }
 18243                             
 18309                             
 18244                         }while(param_value != NULL);
 18310                         }while(param_value != NULL);
 18245                         symbol_c * return_type_symbol = last_type_symbol;
 18311                         symbol_c * return_type_symbol;
       
 18312                         if (search_expression_type->is_literal_integer_type(last_type_symbol))
       
 18313                             return_type_symbol = &search_constant_type_c::lint_type_name;
       
 18314                         else if (search_expression_type->is_literal_real_type(last_type_symbol))
       
 18315                             return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 18316                         else
       
 18317                             return_type_symbol = last_type_symbol;
 18246                         function_type_suffix = return_type_symbol;
 18318                         function_type_suffix = return_type_symbol;
 18247                         break;
 18319                         break;
 18248                         
 18320                         
 18249                     }
 18321                     }
 18250                     
 18322                     
 18455                                         /*Function specific CODE */
 18527                                         /*Function specific CODE */
 18456                                         ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
 18528                                         ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
 18457                                     }
 18529                                     }
 18458                                     
 18530                                     
 18459                                 }while(param_value != NULL);
 18531                                 }while(param_value != NULL);
 18460                                 symbol_c * return_type_symbol = last_type_symbol;
 18532                                 symbol_c * return_type_symbol;
       
 18533                                 if (search_expression_type->is_literal_integer_type(last_type_symbol))
       
 18534                                     return_type_symbol = &search_constant_type_c::lint_type_name;
       
 18535                                 else if (search_expression_type->is_literal_real_type(last_type_symbol))
       
 18536                                     return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 18537                                 else
       
 18538                                     return_type_symbol = last_type_symbol;
 18461                                 function_type_suffix = return_type_symbol;
 18539                                 function_type_suffix = return_type_symbol;
 18462                                 break;
 18540                                 break;
 18463                                 
 18541                                 
 18464                             }
 18542                             }
 18465                             
 18543