Author: jonathan
Date: Mon Jan  5 08:39:59 2009
New Revision: 34996

Modified:
   branches/bcanno/compilers/imcc/pbc.c

Log:
[imcc] Create annotations segment when needed, along with initial group.

Modified: branches/bcanno/compilers/imcc/pbc.c
==============================================================================
--- branches/bcanno/compilers/imcc/pbc.c        (original)
+++ branches/bcanno/compilers/imcc/pbc.c        Mon Jan  5 08:39:59 2009
@@ -2166,6 +2166,13 @@
         /* It's an annotation. Add annotations seg if we're missing one. */
         printf("annotation to emit\n");
         if (!interp->code->annotations) {
+            /* Create segment. */
+            interp->code->annotations = PackFile_Segment_new_seg(interp, 
interp->code->base.dir,
+                    PF_ANNOTATIONS_SEG, "ANNOTATIONS", 1);
+
+            /* Create initial group. */
+            PackFile_Annotations_add_group(interp, interp->code->annotations,
+                    IMCC_INFO(interp)->pc - interp->code->base.data);
         }
 
         /* Add annotation. */

Reply via email to