develooper Front page | perl.cvs.parrot | Postings from January 2009

[svn:parrot] r34996 - branches/bcanno/compilers/imcc

From:
jonathan
Date:
January 5, 2009 08:40
Subject:
[svn:parrot] r34996 - branches/bcanno/compilers/imcc
Message ID:
20090105163959.B39C4CB9F9@x12.develooper.com
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. */



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About