stage4/generate_c/il_code_gen.c
changeset 210 8387cac2aba6
parent 208 c72748a12ae3
child 217 f5dfadf5de54
equal deleted inserted replaced
209:30cbae46190d 210:8387cac2aba6
 13817                                 /*Function specific CODE */
 13817                                 /*Function specific CODE */
 13818                                 ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
 13818                                 ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
 13819                             }
 13819                             }
 13820                             
 13820                             
 13821                         }while(param_value != NULL);
 13821                         }while(param_value != NULL);
 13822                         symbol_c * return_type_symbol = last_type_symbol;
 13822                         symbol_c * return_type_symbol;
       
 13823                         if (search_expression_type->is_literal_integer_type(last_type_symbol))
       
 13824                             return_type_symbol = &search_constant_type_c::lint_type_name;
       
 13825                         else if (search_expression_type->is_literal_real_type(last_type_symbol))
       
 13826                             return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 13827                         else
       
 13828                             return_type_symbol = last_type_symbol;
 13823                         function_type_suffix = return_type_symbol;
 13829                         function_type_suffix = return_type_symbol;
 13824                         break;
 13830                         break;
 13825                         
 13831                         
 13826                     }
 13832                     }
 13827                     
 13833                     
 14028                                 /*Function specific CODE */
 14034                                 /*Function specific CODE */
 14029                                 ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
 14035                                 ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
 14030                             }
 14036                             }
 14031                             
 14037                             
 14032                         }while(param_value != NULL);
 14038                         }while(param_value != NULL);
 14033                         symbol_c * return_type_symbol = last_type_symbol;
 14039                         symbol_c * return_type_symbol;
       
 14040                         if (search_expression_type->is_literal_integer_type(last_type_symbol))
       
 14041                             return_type_symbol = &search_constant_type_c::lint_type_name;
       
 14042                         else if (search_expression_type->is_literal_real_type(last_type_symbol))
       
 14043                             return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 14044                         else
       
 14045                             return_type_symbol = last_type_symbol;
 14034                         function_type_suffix = return_type_symbol;
 14046                         function_type_suffix = return_type_symbol;
 14035                         break;
 14047                         break;
 14036                         
 14048                         
 14037                     }
 14049                     }
 14038                     
 14050                     
 14130                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
 14142                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
 14131                         
 14143                         
 14132                         if (IN2_type_symbol == NULL)
 14144                         if (IN2_type_symbol == NULL)
 14133                           IN2_type_symbol = last_type_symbol;
 14145                           IN2_type_symbol = last_type_symbol;
 14134                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
 14146                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
 14135                         symbol_c * return_type_symbol = last_type_symbol;
 14147                         symbol_c * return_type_symbol;
       
 14148                         if (search_expression_type->is_literal_integer_type(last_type_symbol))
       
 14149                             return_type_symbol = &search_constant_type_c::lint_type_name;
       
 14150                         else if (search_expression_type->is_literal_real_type(last_type_symbol))
       
 14151                             return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 14152                         else
       
 14153                             return_type_symbol = last_type_symbol;
 14136                         function_type_suffix = return_type_symbol;
 14154                         function_type_suffix = return_type_symbol;
 14137                         break;
 14155                         break;
 14138                         
 14156                         
 14139                     }
 14157                     }
 14140                     
 14158                     
 14386                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
 14404                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
 14387                         
 14405                         
 14388                         if (IN2_type_symbol == NULL)
 14406                         if (IN2_type_symbol == NULL)
 14389                           IN2_type_symbol = last_type_symbol;
 14407                           IN2_type_symbol = last_type_symbol;
 14390                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
 14408                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
 14391                         symbol_c * return_type_symbol = last_type_symbol;
 14409                         symbol_c * return_type_symbol;
       
 14410                         if (search_expression_type->is_literal_integer_type(last_type_symbol))
       
 14411                             return_type_symbol = &search_constant_type_c::lint_type_name;
       
 14412                         else if (search_expression_type->is_literal_real_type(last_type_symbol))
       
 14413                             return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 14414                         else
       
 14415                             return_type_symbol = last_type_symbol;
 14392                         function_type_suffix = return_type_symbol;
 14416                         function_type_suffix = return_type_symbol;
 14393                         break;
 14417                         break;
 14394                         
 14418                         
 14395                     }
 14419                     }
 14396                     
 14420                     
 14488                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
 14512                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
 14489                         
 14513                         
 14490                         if (IN2_type_symbol == NULL)
 14514                         if (IN2_type_symbol == NULL)
 14491                           IN2_type_symbol = last_type_symbol;
 14515                           IN2_type_symbol = last_type_symbol;
 14492                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
 14516                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
 14493                         symbol_c * return_type_symbol = last_type_symbol;
 14517                         symbol_c * return_type_symbol;
       
 14518                         if (search_expression_type->is_literal_integer_type(last_type_symbol))
       
 14519                             return_type_symbol = &search_constant_type_c::lint_type_name;
       
 14520                         else if (search_expression_type->is_literal_real_type(last_type_symbol))
       
 14521                             return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 14522                         else
       
 14523                             return_type_symbol = last_type_symbol;
 14494                         function_type_suffix = return_type_symbol;
 14524                         function_type_suffix = return_type_symbol;
 14495                         break;
 14525                         break;
 14496                         
 14526                         
 14497                     }
 14527                     }
 14498                     
 14528                     
 14550                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
 14580                         ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
 14551                         
 14581                         
 14552                         if (IN2_type_symbol == NULL)
 14582                         if (IN2_type_symbol == NULL)
 14553                           IN2_type_symbol = last_type_symbol;
 14583                           IN2_type_symbol = last_type_symbol;
 14554                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
 14584                         ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
 14555                         symbol_c * return_type_symbol = last_type_symbol;
 14585                         symbol_c * return_type_symbol;
       
 14586                         if (search_expression_type->is_literal_integer_type(last_type_symbol))
       
 14587                             return_type_symbol = &search_constant_type_c::lint_type_name;
       
 14588                         else if (search_expression_type->is_literal_real_type(last_type_symbol))
       
 14589                             return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 14590                         else
       
 14591                             return_type_symbol = last_type_symbol;
 14556                         function_type_suffix = IN1_type_symbol;
 14592                         function_type_suffix = IN1_type_symbol;
 14557                         break;
 14593                         break;
 14558                         
 14594                         
 14559                     }
 14595                     }
 14560                     
 14596                     
 14591                 function_name = (symbol_c*)(new pragma_c("__move_"));
 14627                 function_name = (symbol_c*)(new pragma_c("__move_"));
 14592                 
 14628                 
 14593                 if (IN_type_symbol == NULL)
 14629                 if (IN_type_symbol == NULL)
 14594                   IN_type_symbol = last_type_symbol;
 14630                   IN_type_symbol = last_type_symbol;
 14595                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
 14631                 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in)
 14596                 symbol_c * return_type_symbol = last_type_symbol;
 14632                 symbol_c * return_type_symbol;
       
 14633                 if (search_expression_type->is_literal_integer_type(last_type_symbol))
       
 14634                     return_type_symbol = &search_constant_type_c::lint_type_name;
       
 14635                 else if (search_expression_type->is_literal_real_type(last_type_symbol))
       
 14636                     return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 14637                 else
       
 14638                     return_type_symbol = last_type_symbol;
 14597                 function_type_suffix = return_type_symbol;
 14639                 function_type_suffix = return_type_symbol;
 14598                 break;
 14640                 break;
 14599                 
 14641                 
 14600             }
 14642             }
 14601             
 14643             
 14924                                 /*Function specific CODE */
 14966                                 /*Function specific CODE */
 14925                                 ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
 14967                                 ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
 14926                             }
 14968                             }
 14927                             
 14969                             
 14928                         }while(param_value != NULL);
 14970                         }while(param_value != NULL);
 14929                         symbol_c * return_type_symbol = last_type_symbol;
 14971                         symbol_c * return_type_symbol;
       
 14972                         if (search_expression_type->is_literal_integer_type(last_type_symbol))
       
 14973                             return_type_symbol = &search_constant_type_c::lword_type_name;
       
 14974                         else
       
 14975                             return_type_symbol = last_type_symbol;
 14930                         function_type_suffix = return_type_symbol;
 14976                         function_type_suffix = return_type_symbol;
 14931                         break;
 14977                         break;
 14932                         
 14978                         
 14933                     }
 14979                     }
 14934                     
 14980                     
 15015                                 /*Function specific CODE */
 15061                                 /*Function specific CODE */
 15016                                 ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
 15062                                 ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
 15017                             }
 15063                             }
 15018                             
 15064                             
 15019                         }while(param_value != NULL);
 15065                         }while(param_value != NULL);
 15020                         symbol_c * return_type_symbol = last_type_symbol;
 15066                         symbol_c * return_type_symbol;
       
 15067                         if (search_expression_type->is_literal_integer_type(last_type_symbol))
       
 15068                             return_type_symbol = &search_constant_type_c::lword_type_name;
       
 15069                         else
       
 15070                             return_type_symbol = last_type_symbol;
 15021                         function_type_suffix = return_type_symbol;
 15071                         function_type_suffix = return_type_symbol;
 15022                         break;
 15072                         break;
 15023                         
 15073                         
 15024                     }
 15074                     }
 15025                     
 15075                     
 15106                                 /*Function specific CODE */
 15156                                 /*Function specific CODE */
 15107                                 ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
 15157                                 ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
 15108                             }
 15158                             }
 15109                             
 15159                             
 15110                         }while(param_value != NULL);
 15160                         }while(param_value != NULL);
 15111                         symbol_c * return_type_symbol = last_type_symbol;
 15161                         symbol_c * return_type_symbol;
       
 15162                         if (search_expression_type->is_literal_integer_type(last_type_symbol))
       
 15163                             return_type_symbol = &search_constant_type_c::lword_type_name;
       
 15164                         else
       
 15165                             return_type_symbol = last_type_symbol;
 15112                         function_type_suffix = return_type_symbol;
 15166                         function_type_suffix = return_type_symbol;
 15113                         break;
 15167                         break;
 15114                         
 15168                         
 15115                     }
 15169                     }
 15116                     
 15170                     
 15224                                 ADD_PARAM_LIST(IN0_param_value, IN0_type_symbol, function_param_iterator_c::direction_in)
 15278                                 ADD_PARAM_LIST(IN0_param_value, IN0_type_symbol, function_param_iterator_c::direction_in)
 15225                                 
 15279                                 
 15226                                 if (IN1_type_symbol == NULL)
 15280                                 if (IN1_type_symbol == NULL)
 15227                                   IN1_type_symbol = last_type_symbol;
 15281                                   IN1_type_symbol = last_type_symbol;
 15228                                 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
 15282                                 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
 15229                                 symbol_c * return_type_symbol = last_type_symbol;
 15283                                 symbol_c * return_type_symbol;
       
 15284                                 if (search_expression_type->is_literal_integer_type(last_type_symbol))
       
 15285                                     return_type_symbol = &search_constant_type_c::lint_type_name;
       
 15286                                 else if (search_expression_type->is_literal_real_type(last_type_symbol))
       
 15287                                     return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 15288                                 else
       
 15289                                     return_type_symbol = last_type_symbol;
 15230                                 function_type_suffix = IN0_type_symbol;
 15290                                 function_type_suffix = IN0_type_symbol;
 15231                                 break;
 15291                                 break;
 15232                                 
 15292                                 
 15233                             }
 15293                             }
 15234                             
 15294                             
 15321                                 /*Function specific CODE */
 15381                                 /*Function specific CODE */
 15322                                 ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
 15382                                 ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
 15323                             }
 15383                             }
 15324                             
 15384                             
 15325                         }while(param_value != NULL);
 15385                         }while(param_value != NULL);
 15326                         symbol_c * return_type_symbol = last_type_symbol;
 15386                         symbol_c * return_type_symbol;
       
 15387                         if (search_expression_type->is_literal_integer_type(last_type_symbol))
       
 15388                             return_type_symbol = &search_constant_type_c::lint_type_name;
       
 15389                         else if (search_expression_type->is_literal_real_type(last_type_symbol))
       
 15390                             return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 15391                         else
       
 15392                             return_type_symbol = last_type_symbol;
 15327                         function_type_suffix = return_type_symbol;
 15393                         function_type_suffix = return_type_symbol;
 15328                         break;
 15394                         break;
 15329                         
 15395                         
 15330                     }
 15396                     }
 15331                     
 15397                     
 15412                                 /*Function specific CODE */
 15478                                 /*Function specific CODE */
 15413                                 ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
 15479                                 ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
 15414                             }
 15480                             }
 15415                             
 15481                             
 15416                         }while(param_value != NULL);
 15482                         }while(param_value != NULL);
 15417                         symbol_c * return_type_symbol = last_type_symbol;
 15483                         symbol_c * return_type_symbol;
       
 15484                         if (search_expression_type->is_literal_integer_type(last_type_symbol))
       
 15485                             return_type_symbol = &search_constant_type_c::lint_type_name;
       
 15486                         else if (search_expression_type->is_literal_real_type(last_type_symbol))
       
 15487                             return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 15488                         else
       
 15489                             return_type_symbol = last_type_symbol;
 15418                         function_type_suffix = return_type_symbol;
 15490                         function_type_suffix = return_type_symbol;
 15419                         break;
 15491                         break;
 15420                         
 15492                         
 15421                     }
 15493                     }
 15422                     
 15494                     
 15613                                         /*Function specific CODE */
 15685                                         /*Function specific CODE */
 15614                                         ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
 15686                                         ADD_PARAM_LIST(param_value, current_type_symbol, function_param_iterator_c::direction_in)
 15615                                     }
 15687                                     }
 15616                                     
 15688                                     
 15617                                 }while(param_value != NULL);
 15689                                 }while(param_value != NULL);
 15618                                 symbol_c * return_type_symbol = last_type_symbol;
 15690                                 symbol_c * return_type_symbol;
       
 15691                                 if (search_expression_type->is_literal_integer_type(last_type_symbol))
       
 15692                                     return_type_symbol = &search_constant_type_c::lint_type_name;
       
 15693                                 else if (search_expression_type->is_literal_real_type(last_type_symbol))
       
 15694                                     return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 15695                                 else
       
 15696                                     return_type_symbol = last_type_symbol;
 15619                                 function_type_suffix = return_type_symbol;
 15697                                 function_type_suffix = return_type_symbol;
 15620                                 break;
 15698                                 break;
 15621                                 
 15699                                 
 15622                             }
 15700                             }
 15623                             
 15701