stage4/generate_c/generate_c_st.cc
changeset 531 e7d6f28fc882
parent 505 21be0f2f242d
child 594 c8092e909886
equal deleted inserted replaced
530:1eacd7afcab1 531:e7d6f28fc882
   133     void generate(statement_list_c *stl) {
   133     void generate(statement_list_c *stl) {
   134       stl->accept(*this);
   134       stl->accept(*this);
   135     }
   135     }
   136 
   136 
   137   private:
   137   private:
       
   138     
       
   139     
       
   140 
       
   141 
       
   142 
   138 
   143 
   139 void *print_getter(symbol_c *symbol) {
   144 void *print_getter(symbol_c *symbol) {
   140   unsigned int vartype = search_var_instance_decl->get_vartype(symbol);
   145   unsigned int vartype = search_var_instance_decl->get_vartype(symbol);
   141   if (wanted_variablegeneration == fparam_output_vg) {
   146   if (wanted_variablegeneration == fparam_output_vg) {
   142     if (vartype == search_var_instance_decl_c::external_vt)
   147     if (vartype == search_var_instance_decl_c::external_vt)
   157   s4o.print("(");
   162   s4o.print("(");
   158 
   163 
   159   variablegeneration_t old_wanted_variablegeneration = wanted_variablegeneration;
   164   variablegeneration_t old_wanted_variablegeneration = wanted_variablegeneration;
   160   wanted_variablegeneration = complextype_base_vg;
   165   wanted_variablegeneration = complextype_base_vg;
   161   symbol->accept(*this);
   166   symbol->accept(*this);
   162   if (search_varfb_instance_type->type_is_complex(symbol))
   167   if (search_var_instance_decl->type_is_complex(symbol))
   163     s4o.print(",");
   168     s4o.print(",");
   164   wanted_variablegeneration = complextype_suffix_vg;
   169   wanted_variablegeneration = complextype_suffix_vg;
   165   symbol->accept(*this);
   170   symbol->accept(*this);
   166   s4o.print(")");
   171   s4o.print(")");
   167   wanted_variablegeneration = old_wanted_variablegeneration;
   172   wanted_variablegeneration = old_wanted_variablegeneration;
   175 		symbol_c* fb_value = NULL) {
   180 		symbol_c* fb_value = NULL) {
   176   
   181   
   177   bool type_is_complex = false;
   182   bool type_is_complex = false;
   178   if (fb_symbol == NULL) {
   183   if (fb_symbol == NULL) {
   179     unsigned int vartype = search_var_instance_decl->get_vartype(symbol);
   184     unsigned int vartype = search_var_instance_decl->get_vartype(symbol);
   180     type_is_complex = search_varfb_instance_type->type_is_complex(symbol);
   185     type_is_complex = search_var_instance_decl->type_is_complex(symbol);
   181     if (vartype == search_var_instance_decl_c::external_vt)
   186     if (vartype == search_var_instance_decl_c::external_vt)
   182       s4o.print(SET_EXTERNAL);
   187       s4o.print(SET_EXTERNAL);
   183     else if (vartype == search_var_instance_decl_c::located_vt)
   188     else if (vartype == search_var_instance_decl_c::located_vt)
   184       s4o.print(SET_LOCATED);
   189       s4o.print(SET_LOCATED);
   185     else
   190     else