Author: jonathan
Date: Thu Nov 27 16:23:13 2008
New Revision: 33282

Modified:
   branches/bcanno/include/parrot/packfile.h
   branches/bcanno/src/packfile.c
   branches/bcanno/src/pbc_merge.c

Log:
[core] Rename PackFile_DebugMapping to PackFile_DebugFilenameMapping to make 
its use clear.

Modified: branches/bcanno/include/parrot/packfile.h
==============================================================================
--- branches/bcanno/include/parrot/packfile.h   (original)
+++ branches/bcanno/include/parrot/packfile.h   Thu Nov 27 16:23:13 2008
@@ -197,15 +197,15 @@
     PackFile_FixupTable   *fixups;
 };
 
-typedef struct PackFile_DebugMapping {
+typedef struct PackFile_DebugFilenameMapping {
     opcode_t offset;
     opcode_t filename;
-} PackFile_DebugMapping;
+} PackFile_DebugFilenameMapping;
 
 typedef struct PackFile_Debug {
     PackFile_Segment        base;
     opcode_t                num_mappings;
-    PackFile_DebugMapping **mappings;
+    PackFile_DebugFilenameMapping **mappings;
     PackFile_ByteCode      *code;   /* where this segment belongs to */
 } PackFile_Debug;
 

Modified: branches/bcanno/src/packfile.c
==============================================================================
--- branches/bcanno/src/packfile.c      (original)
+++ branches/bcanno/src/packfile.c      Thu Nov 27 16:23:13 2008
@@ -2244,7 +2244,7 @@
 {
     PackFile_Debug * const debug = mem_allocate_zeroed_typed(PackFile_Debug);
 
-    debug->mappings              = mem_allocate_typed(PackFile_DebugMapping *);
+    debug->mappings              = 
mem_allocate_typed(PackFile_DebugFilenameMapping *);
     debug->mappings[0]           = NULL;
 
     return (PackFile_Segment *)debug;
@@ -2342,12 +2342,12 @@
     debug->num_mappings = PF_fetch_opcode(self->pf, &cursor);
 
     /* Allocate space for mappings vector. */
-    mem_realloc_n_typed(debug->mappings, debug->num_mappings+1, 
PackFile_DebugMapping *);
+    mem_realloc_n_typed(debug->mappings, debug->num_mappings+1, 
PackFile_DebugFilenameMapping *);
 
     /* Read in each mapping. */
     for (i = 0; i < debug->num_mappings; i++) {
         /* Allocate struct and get offset and filename type. */
-        debug->mappings[i] = mem_allocate_typed(PackFile_DebugMapping);
+        debug->mappings[i] = mem_allocate_typed(PackFile_DebugFilenameMapping);
         debug->mappings[i]->offset = PF_fetch_opcode(self->pf, &cursor);
         debug->mappings[i]->filename = PF_fetch_opcode(self->pf, &cursor);
     }
@@ -2483,13 +2483,13 @@
 Parrot_debug_add_mapping(PARROT_INTERP, ARGMOD(PackFile_Debug *debug),
                          opcode_t offset, ARGIN(const char *filename))
 {
-    PackFile_DebugMapping *mapping;
+    PackFile_DebugFilenameMapping *mapping;
     PackFile_ConstTable * const ct = debug->code->const_table;
     int insert_pos = 0;
     PackFile_Constant *fnconst;
 
     /* Allocate space for the extra entry. */
-    mem_realloc_n_typed(debug->mappings, debug->num_mappings+1, 
PackFile_DebugMapping *);
+    mem_realloc_n_typed(debug->mappings, debug->num_mappings+1, 
PackFile_DebugFilenameMapping *);
 
     /* Can it just go on the end? */
     if (debug->num_mappings == 0 ||
@@ -2521,7 +2521,7 @@
     ct->constants[ct->const_count - 1] = fnconst;
 
     /* Set up new entry and insert it. */
-    mapping               = mem_allocate_typed(PackFile_DebugMapping);
+    mapping               = mem_allocate_typed(PackFile_DebugFilenameMapping);
     mapping->offset       = offset;
     mapping->filename     = ct->const_count - 1;
 

Modified: branches/bcanno/src/pbc_merge.c
==============================================================================
--- branches/bcanno/src/pbc_merge.c     (original)
+++ branches/bcanno/src/pbc_merge.c     Thu Nov 27 16:23:13 2008
@@ -547,8 +547,8 @@
 {
     PackFile_Debug *debug_seg;
     opcode_t *lines                  = mem_allocate_typed(opcode_t);
-    PackFile_DebugMapping **mappings =
-        mem_allocate_typed(PackFile_DebugMapping *);
+    PackFile_DebugFilenameMapping **mappings =
+        mem_allocate_typed(PackFile_DebugFilenameMapping *);
     opcode_t num_mappings = 0;
     opcode_t num_lines    = 0;
     int i, j;
@@ -570,12 +570,12 @@
             in_seg->base.size * sizeof (opcode_t));
 
         /* Concatenate mappings. */
-        mappings = (PackFile_DebugMapping **)mem_sys_realloc(mappings,
+        mappings = (PackFile_DebugFilenameMapping **)mem_sys_realloc(mappings,
                    (num_mappings + in_seg->num_mappings) *
                    sizeof (Parrot_Pointer));
         for (j = 0; j < in_seg->num_mappings; j++) {
-            PackFile_DebugMapping *mapping = mem_allocate_typed(
-                PackFile_DebugMapping);
+            PackFile_DebugFilenameMapping *mapping = mem_allocate_typed(
+                PackFile_DebugFilenameMapping);
             STRUCT_COPY(mapping, in_seg->mappings[j]);
             mapping->offset += num_lines;
             mapping->filename += inputs[i]->const_start;

Reply via email to