X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=nesc.git;a=blobdiff_plain;f=src%2Fnesc-abstract.c;h=9db3a16f30f1929f497088a0f1a90839335f4972;hp=2ffc824eef2e88a4af4a506e93aab90ce82e43b4;hb=7b54393e237ed8f23c0c74f0a6cbc8de26c5bf98;hpb=57d4530c4d6814fa25338a00cc65b95938c723b6 diff --git a/src/nesc-abstract.c b/src/nesc-abstract.c index 2ffc824..9db3a16 100644 --- a/src/nesc-abstract.c +++ b/src/nesc-abstract.c @@ -348,9 +348,9 @@ static type unary_type(unary e) case kind_unary_plus: case kind_unary_minus: case kind_bitnot: - return type_default_conversion(e->type); + return type_default_conversion(e->arg1->type); case kind_realpart: case kind_imagpart: { - type etype = type_default_conversion(e->type); + type etype = type_default_conversion(e->arg1->type); return type_complex(etype) ? make_base_type(etype) : etype; } @@ -730,12 +730,13 @@ static void set_specification_instantiations(nesc_declaration component) abstract configurations)... */ { - component_spec_iterate(component, set_ddecl_instantiation1, NULL, TRUE); + component_spec_iterate(component, set_ddecl_instantiation1, NULL, TRUE, TRUE); } static void set_ddecl_instantiation2(data_declaration fndecl, void *data) { /* We just make the decl fndecl is a copy of point back to fndecl */ + fndecl->instanceof->instantiation = fndecl; } @@ -744,14 +745,9 @@ static void set_specification_instantiations_shallow(nesc_declaration component) the original abstract component from which component is derived to the copies in component (in preparation for cloning component's AST and pointing to component's decls) - - The original data_declarations can be found by following the - shadowed fields. We may have to follow these one deep (abstract - modules in configurations) or two deep (abstract modules in - abstract configurations)... */ { - component_spec_iterate(component, set_ddecl_instantiation2, NULL, TRUE); + component_spec_iterate(component, set_ddecl_instantiation2, NULL, TRUE, TRUE); } static declaration instantiate_parameters(region r, declaration orig_parms)