[svn:parrot] r45399 - trunk/src/pmc

chromatic at svn.parrot.org chromatic at svn.parrot.org
Sun Apr 4 04:07:56 UTC 2010


Author: chromatic
Date: Sun Apr  4 04:07:55 2010
New Revision: 45399
URL: https://trac.parrot.org/parrot/changeset/45399

Log:
[PMC] Removed unnecessary callocs from FixedPMCArray.

Modified:
   trunk/src/pmc/fixedpmcarray.pmc

Modified: trunk/src/pmc/fixedpmcarray.pmc
==============================================================================
--- trunk/src/pmc/fixedpmcarray.pmc	Sat Apr  3 22:10:45 2010	(r45398)
+++ trunk/src/pmc/fixedpmcarray.pmc	Sun Apr  4 04:07:55 2010	(r45399)
@@ -131,7 +131,7 @@
 
         if (size) {
             PMC_size(dest)  = size;
-            PMC_array(dest) = mem_gc_allocate_n_zeroed_typed(INTERP, size, PMC *);
+            PMC_array(dest) = mem_gc_allocate_n_typed(INTERP, size, PMC *);
             mem_copy_n_typed(PMC_array(dest), PMC_array(SELF), size, PMC *);
             PObj_custom_mark_destroy_SETALL(dest);
         }
@@ -401,7 +401,7 @@
                     _("FixedPMCArray: Cannot set array size to a negative number"));
 
         PMC_size(SELF) = size;
-        data           = mem_gc_allocate_n_zeroed_typed(INTERP, size, PMC *);
+        data           = mem_gc_allocate_n_typed(INTERP, size, PMC *);
 
         for (i = 0; i < size; i++)
             data[i] = PMCNULL;
@@ -424,7 +424,7 @@
             mem_gc_free(INTERP, PMC_array(SELF));
 
         size            = PMC_size(SELF) = VTABLE_elements(INTERP, value);
-        PMC_array(SELF) = mem_gc_allocate_n_zeroed_typed(INTERP, size, PMC *);
+        PMC_array(SELF) = mem_gc_allocate_n_typed(INTERP, size, PMC *);
 
         for (i = 0; i < size; i++)
             (PMC_array(SELF))[i] = VTABLE_get_pmc_keyed_int(INTERP, value, i);


More information about the parrot-commits mailing list