[svn:parrot] r44178 - branches/sys_mem_reduce/src

bacek at svn.parrot.org bacek at svn.parrot.org
Fri Feb 19 13:28:24 UTC 2010


Author: bacek
Date: Fri Feb 19 13:28:24 2010
New Revision: 44178
URL: https://trac.parrot.org/parrot/changeset/44178

Log:
Use pointer from mem_gc_realloc

Modified:
   branches/sys_mem_reduce/src/embed.c
   branches/sys_mem_reduce/src/packfile.c
   branches/sys_mem_reduce/src/pbc_merge.c

Modified: branches/sys_mem_reduce/src/embed.c
==============================================================================
--- branches/sys_mem_reduce/src/embed.c	Fri Feb 19 13:28:05 2010	(r44177)
+++ branches/sys_mem_reduce/src/embed.c	Fri Feb 19 13:28:24 2010	(r44178)
@@ -474,7 +474,8 @@
                 break;
 
             chunk_size   = 1024;
-            mem_gc_realloc_n_typed(interp, program_code, program_size + chunk_size, char);
+            program_code = mem_gc_realloc_n_typed(interp, program_code,
+                    program_size + chunk_size, char);
 
             if (!program_code) {
                 Parrot_io_eprintf(interp,

Modified: branches/sys_mem_reduce/src/packfile.c
==============================================================================
--- branches/sys_mem_reduce/src/packfile.c	Fri Feb 19 13:28:05 2010	(r44177)
+++ branches/sys_mem_reduce/src/packfile.c	Fri Feb 19 13:28:24 2010	(r44178)
@@ -4453,7 +4453,7 @@
     /* Allocate extra space for the group in the groups array. */
     if (self->groups)
         self->groups =
-            mem_gc_realloc_n_typed_zeroed(interp, self->groups,
+            self->groups = mem_gc_realloc_n_typed_zeroed(interp, self->groups,
                 1 + self->num_groups, PackFile_Annotations_Group *);
     else
         self->groups = mem_gc_allocate_n_typed(interp,
@@ -4509,8 +4509,7 @@
     if (key_id == -1) {
         /* We do have it. Add key entry. */
         if (self->keys)
-            self->keys =
-                mem_gc_realloc_n_typed_zeroed(interp, self->keys,
+            self->keys = mem_gc_realloc_n_typed_zeroed(interp, self->keys,
                     1 + self->num_keys, PackFile_Annotations_Key *);
         else
             self->keys = mem_gc_allocate_n_typed(interp,

Modified: branches/sys_mem_reduce/src/pbc_merge.c
==============================================================================
--- branches/sys_mem_reduce/src/pbc_merge.c	Fri Feb 19 13:28:05 2010	(r44177)
+++ branches/sys_mem_reduce/src/pbc_merge.c	Fri Feb 19 13:28:24 2010	(r44178)
@@ -267,7 +267,7 @@
         if (program_size == wanted)
             break;
         chunk_size   = 1024;
-        mem_gc_realloc_n_typed(interp, program_code,
+        program_code = mem_gc_realloc_n_typed(interp, program_code,
                 program_size + chunk_size, char);
 
         cursor = (char *)program_code + program_size;
@@ -414,7 +414,7 @@
 
         /* Allocate space for the constant list, provided we have some. */
         if (in_seg->const_count > 0)
-            mem_gc_realloc_n_typed(interp, constants,
+            contants = mem_gc_realloc_n_typed(interp, constants,
                     cursor + in_seg->const_count, PackFile_Constant*);
 
         /* Loop over the constants and copy them to the output PBC. */
@@ -505,7 +505,7 @@
 
         /* Allocate space for these fixups, provided we have some. */
         if (in_seg->fixup_count > 0) {
-            mem_gc_realloc_n_typed(interp, fixups,
+            fixups = mem_gc_realloc_n_typed(interp, fixups,
                     cursor + in_seg->fixup_count, PackFile_FixupEntry*);
         }
 
@@ -583,14 +583,14 @@
         PackFile_Debug *in_seg = inputs[i]->pf->cur_cs->debugs;
 
         /* Concatenate line numbers. */
-        mem_gc_realloc_n_typed(interp, lines,
+        lines = mem_gc_realloc_n_typed(interp, lines,
                 num_lines + in_seg->base.size, opcode_t);
 
         memcpy(lines + num_lines, in_seg->base.data,
             in_seg->base.size * sizeof (opcode_t));
 
         /* Concatenate mappings. */
-        mem_gc_realloc_n_typed(interp, mappings,
+        mappings = mem_gc_realloc_n_typed(interp, mappings,
                 num_mappings + in_seg->num_mappings,
                 PackFile_DebugFilenameMapping*);
 


More information about the parrot-commits mailing list