--- a/stage4/generate_c/generate_c_inlinefcall.cc Sat Apr 14 15:19:17 2012 +0100
+++ b/stage4/generate_c/generate_c_inlinefcall.cc Sat Apr 14 16:44:53 2012 +0100
@@ -106,6 +106,7 @@
search_expression_type_c *search_expression_type;
search_varfb_instance_type_c *search_varfb_instance_type;
+ search_var_instance_decl_c *search_var_instance_decl;
search_base_type_c search_base_type;
@@ -119,6 +120,8 @@
{
search_expression_type = new search_expression_type_c(scope);
search_varfb_instance_type = new search_varfb_instance_type_c(scope);
+ search_var_instance_decl = new search_var_instance_decl_c(scope);
+
this->set_variable_prefix(variable_prefix);
current_operand = NULL;
current_operand_type = NULL;
@@ -132,6 +135,7 @@
virtual ~generate_c_inlinefcall_c(void) {
delete search_expression_type;
delete search_varfb_instance_type;
+ delete search_var_instance_decl;
}
void print(symbol_c* symbol) {
@@ -309,7 +313,7 @@
}
void *print_getter(symbol_c *symbol) {
- unsigned int vartype = search_varfb_instance_type->get_vartype(symbol);
+ unsigned int vartype = search_var_instance_decl->get_vartype(symbol);
if (vartype == search_var_instance_decl_c::external_vt)
s4o.print(GET_EXTERNAL);
else if (vartype == search_var_instance_decl_c::located_vt)
@@ -320,7 +324,7 @@
wanted_variablegeneration = complextype_base_vg;
symbol->accept(*this);
- if (search_varfb_instance_type->type_is_complex())
+ if (search_varfb_instance_type->type_is_complex(symbol))
s4o.print(",");
wanted_variablegeneration = complextype_suffix_vg;
symbol->accept(*this);
@@ -332,7 +336,7 @@
void *print_setter(symbol_c* symbol,
symbol_c* type,
symbol_c* value) {
- unsigned int vartype = search_varfb_instance_type->get_vartype(symbol);
+ unsigned int vartype = search_var_instance_decl->get_vartype(symbol);
if (vartype == search_var_instance_decl_c::external_vt)
s4o.print(SET_EXTERNAL);
else if (vartype == search_var_instance_decl_c::located_vt)
@@ -346,7 +350,7 @@
s4o.print(",");
wanted_variablegeneration = expression_vg;
print_check_function(type, value, NULL, true);
- if (search_varfb_instance_type->type_is_complex()) {
+ if (search_varfb_instance_type->type_is_complex(symbol)) {
s4o.print(",");
wanted_variablegeneration = complextype_suffix_vg;
symbol->accept(*this);