[svn:parrot] r46181 - branches/codestring/src/pmc

coke at svn.parrot.org coke at svn.parrot.org
Fri Apr 30 06:32:34 UTC 2010


Author: coke
Date: Fri Apr 30 06:32:33 2010
New Revision: 46181
URL: https://trac.parrot.org/parrot/changeset/46181

Log:
Revert changes to this file; 

tewk++ points out that FSA's mark() doesn't mark items outside the size of
the array anyway, so these should be GC'd.

Modified:
   branches/codestring/src/pmc/resizablestringarray.pmc

Modified: branches/codestring/src/pmc/resizablestringarray.pmc
==============================================================================
--- branches/codestring/src/pmc/resizablestringarray.pmc	Fri Apr 30 06:28:15 2010	(r46180)
+++ branches/codestring/src/pmc/resizablestringarray.pmc	Fri Apr 30 06:32:33 2010	(r46181)
@@ -220,25 +220,12 @@
         }
         else if (new_size <= resize_threshold) {
             /* zero out anything that was previously allocated
-             * if we're growing or shrinking the array */
-            INTVAL old_size, min, max;
+             * if we're growing the array */
+            INTVAL old_size;
             GET_ATTR_size(interp, SELF, old_size);
-
             if (new_size > old_size) {
-                min = old_size;
-                max = new_size;
-            }
-            else if (new_size < old_size) {
-                min = new_size;
-                max = old_size;
-            }
-            else {
-                return;
-            }
-
-            {
                 INTVAL i;
-                for (i = min; i < max; i++)
+                for (i = old_size; i < new_size; i++)
                     str_array[i] = NULL;
             }
 


More information about the parrot-commits mailing list