stage4/generate_c/generate_c_inlinefcall.cc
changeset 231 b8527b0abe75
parent 228 43831b683764
child 233 3d23a68183d3
equal deleted inserted replaced
230:816846a8d66b 231:b8527b0abe75
   205 
   205 
   206     void *print_setter(symbol_c* symbol,
   206     void *print_setter(symbol_c* symbol,
   207     		symbol_c* type,
   207     		symbol_c* type,
   208     		symbol_c* value) {
   208     		symbol_c* value) {
   209       unsigned int vartype = search_varfb_instance_type->get_vartype(symbol);
   209       unsigned int vartype = search_varfb_instance_type->get_vartype(symbol);
   210       if (vartype == search_var_instance_decl_c::external_vt)
   210       if (vartype == search_var_instance_decl_c::external_vt) {
   211         s4o.print(SET_EXTERNAL);
   211         symbolic_variable_c *variable = dynamic_cast<symbolic_variable_c *>(symbol);
   212       else if (vartype == search_var_instance_decl_c::located_vt)
   212         /* TODO Find a solution for forcing global complex variables */
   213         s4o.print(SET_LOCATED);
   213         if (variable != NULL) {
   214       else
   214           s4o.print(SET_EXTERNAL);
   215         s4o.print(SET_VAR);
   215           s4o.print("(");
   216       s4o.print("(");
   216           variable->var_name->accept(*this);
       
   217           s4o.print(",");
       
   218         }
       
   219         else {
       
   220           s4o.print(SET_COMPLEX_EXTERNAL);
       
   221           s4o.print("(");
       
   222         }
       
   223       }
       
   224       else {
       
   225         if (vartype == search_var_instance_decl_c::located_vt)
       
   226           s4o.print(SET_LOCATED);
       
   227         else
       
   228           s4o.print(SET_VAR);
       
   229         s4o.print("(");
       
   230       }
   217 
   231 
   218       wanted_variablegeneration = complextype_base_vg;
   232       wanted_variablegeneration = complextype_base_vg;
   219       symbol->accept(*this);
   233       symbol->accept(*this);
   220       s4o.print(",");
   234       s4o.print(",");
   221       wanted_variablegeneration = expression_vg;
   235       wanted_variablegeneration = expression_vg;