]> oss.titaniummirror.com Git - nesc.git/blobdiff - src/nesc-abstract.c
Merge branch 'upstream' (nesc-1.3.2)
[nesc.git] / src / nesc-abstract.c
index 2ffc824eef2e88a4af4a506e93aab90ce82e43b4..9db3a16f30f1929f497088a0f1a90839335f4972 100644 (file)
@@ -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)