]> oss.titaniummirror.com Git - nesc.git/blobdiff - src/nesc-abstract.c
Pristine nesc-1.3.4
[nesc.git] / src / nesc-abstract.c
index 2ffc824eef2e88a4af4a506e93aab90ce82e43b4..3a802a860c03a450f2d0c85b42d089ed92521e15 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)
@@ -803,7 +799,8 @@ static void instantiate_cg(cgraph copy, cgraph original)
          instantiate_endp(&to);
          cto = endpoint_lookup(copy, &to);
 
-         graph_add_edge(cfrom, cto, NULL);
+         /* User graphs have locations on the edges */
+         graph_add_edge(cfrom, cto, EDGE_GET(location, connection));
        }
     }
 }