vdats now record the odat that creates them
[henge/webcc.git] / src / apc / ir.c
index d31bc1a..de021cc 100644 (file)
@@ -98,7 +98,7 @@ push_cdat
   curr_cdatp->idx = num_cdats;
 
   /* Set the cdat as a subclass of the previous cdat */
-
+  (*cdat_stackp)->class_list[(*cdat_stackp)->num_classes] = curr_cdatp;
   /* Push the cdat onto the cdat_stack */
   *++cdat_stackp = curr_cdatp;
 
@@ -220,13 +220,16 @@ insert_set
   struct set* curr_setp;
   struct ref* prev_refp;
   struct ref* curr_refp;
+  struct vdat* curr_vdatp;
 
   curr_odatp = curr_set_odatp; //allocated at insert_set_label, preserved in global space
   curr_cdatp = curr_cdat();
   curr_setp = curr_set();
   prev_refp = prev_ref();
   curr_refp = alloc_ref();
+  curr_vdatp = curr_vdat();
 
+  curr_vdatp->creator = curr_set_odatp;
 
   curr_setp->cdat_idx = curr_cdatp->idx; //does a set need its class idx?
   memmove(curr_setp->name, curr_odatp->name, 32);
@@ -362,18 +365,22 @@ insert_ele()
   uint64_t ref_id;
   struct cdat* curr_cdatp;
   struct odat* curr_odatp;
+  struct vdat* curr_vdatp;
   struct set* curr_setp;
   struct ele* curr_elep;
   struct ref* curr_refp;
   struct ref* prev_refp;
 
+
   curr_cdatp = curr_cdat();
   curr_odatp = curr_odat(); //malloced @ insert_ele_label
+  curr_vdatp = curr_vdat();
   curr_setp = curr_set();
   curr_elep = curr_ele();
   curr_refp = alloc_ref();
   prev_refp = prev_ref();
 
+  curr_vdatp->creator = curr_odatp;
   /* Populate ele in cdat */
   curr_elep->cdat_idx = curr_cdatp->idx;
   curr_setp->num_ele++;