[svn:parrot] r45510 - branches/immutable_strings_part1/src/string

bacek at svn.parrot.org bacek at svn.parrot.org
Sat Apr 10 13:35:44 UTC 2010


Author: bacek
Date: Sat Apr 10 13:35:43 2010
New Revision: 45510
URL: https://trac.parrot.org/parrot/changeset/45510

Log:
Remove redundant calls to make_writeable. It's freshly allocated STRING with enough storage.

Modified:
   branches/immutable_strings_part1/src/string/api.c

Modified: branches/immutable_strings_part1/src/string/api.c
==============================================================================
--- branches/immutable_strings_part1/src/string/api.c	Sat Apr 10 13:35:31 2010	(r45509)
+++ branches/immutable_strings_part1/src/string/api.c	Sat Apr 10 13:35:43 2010	(r45510)
@@ -1454,8 +1454,6 @@
         Parrot_gc_mark_and_sweep(interp, GC_trace_stack_FLAG);
 #endif
 
-    make_writable(interp, &res, minlen, enum_stringrep_one);
-
     { /* bitwise AND the strings */
         const Parrot_UInt1 *curr1 = (Parrot_UInt1 *)s1->strstart;
         const Parrot_UInt1 *curr2 = (Parrot_UInt1 *)s2->strstart;
@@ -1598,8 +1596,6 @@
         Parrot_gc_mark_and_sweep(interp, GC_trace_stack_FLAG);
 #endif
 
-    make_writable(interp, &res, maxlen, enum_stringrep_one);
-
     BITWISE_OR_STRINGS(Parrot_UInt1, Parrot_UInt1, Parrot_UInt1,
             s1, s2, res, maxlen);
     res->bufused = res->strlen = maxlen;
@@ -1665,8 +1661,6 @@
         Parrot_gc_mark_and_sweep(interp, GC_trace_stack_FLAG);
 #endif
 
-    make_writable(interp, &res, maxlen, enum_stringrep_one);
-
     BITWISE_XOR_STRINGS(Parrot_UInt1, Parrot_UInt1, Parrot_UInt1,
             s1, s2, res, maxlen);
     res->bufused = res->strlen = maxlen;
@@ -1733,8 +1727,6 @@
         Parrot_gc_mark_and_sweep(interp, GC_trace_stack_FLAG);
 #endif
 
-    make_writable(interp, &res, len, enum_stringrep_one);
-
     res->strlen = res->bufused = len;
 
     BITWISE_NOT_STRING(Parrot_UInt1, s, res);


More information about the parrot-commits mailing list