[svn:parrot] r45694 - in branches/immutable_strings_part1: include/parrot src src/io src/ops src/pmc src/runcore src/string

bacek at svn.parrot.org bacek at svn.parrot.org
Thu Apr 15 14:30:47 UTC 2010


Author: bacek
Date: Thu Apr 15 14:30:45 2010
New Revision: 45694
URL: https://trac.parrot.org/parrot/changeset/45694

Log:
Remove Parrot_str_append function which was actually synonym for str_concat

Modified:
   branches/immutable_strings_part1/include/parrot/string_funcs.h
   branches/immutable_strings_part1/src/dynext.c
   branches/immutable_strings_part1/src/io/utf8.c
   branches/immutable_strings_part1/src/key.c
   branches/immutable_strings_part1/src/library.c
   branches/immutable_strings_part1/src/ops/string.ops
   branches/immutable_strings_part1/src/packdump.c
   branches/immutable_strings_part1/src/packfile.c
   branches/immutable_strings_part1/src/pmc/bigint.pmc
   branches/immutable_strings_part1/src/pmc/bignum.pmc
   branches/immutable_strings_part1/src/pmc/callcontext.pmc
   branches/immutable_strings_part1/src/pmc/class.pmc
   branches/immutable_strings_part1/src/pmc/codestring.pmc
   branches/immutable_strings_part1/src/pmc/filehandle.pmc
   branches/immutable_strings_part1/src/pmc/fixedbooleanarray.pmc
   branches/immutable_strings_part1/src/pmc/fixedintegerarray.pmc
   branches/immutable_strings_part1/src/pmc/fixedpmcarray.pmc
   branches/immutable_strings_part1/src/pmc/fixedstringarray.pmc
   branches/immutable_strings_part1/src/pmc/hash.pmc
   branches/immutable_strings_part1/src/pmc/object.pmc
   branches/immutable_strings_part1/src/pmc/resizablepmcarray.pmc
   branches/immutable_strings_part1/src/pmc/scalar.pmc
   branches/immutable_strings_part1/src/pmc/stringhandle.pmc
   branches/immutable_strings_part1/src/runcore/profiling.c
   branches/immutable_strings_part1/src/spf_render.c
   branches/immutable_strings_part1/src/string/api.c

Modified: branches/immutable_strings_part1/include/parrot/string_funcs.h
==============================================================================
--- branches/immutable_strings_part1/include/parrot/string_funcs.h	Thu Apr 15 13:58:03 2010	(r45693)
+++ branches/immutable_strings_part1/include/parrot/string_funcs.h	Thu Apr 15 14:30:45 2010	(r45694)
@@ -27,15 +27,6 @@
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
 
 PARROT_EXPORT
-PARROT_WARN_UNUSED_RESULT
-PARROT_CAN_RETURN_NULL
-STRING * Parrot_str_append(PARROT_INTERP,
-    ARGMOD_NULLOK(STRING *a),
-    ARGIN_NULLOK(STRING *b))
-        __attribute__nonnull__(1)
-        FUNC_MODIFIES(*a);
-
-PARROT_EXPORT
 PARROT_CANNOT_RETURN_NULL
 STRING * Parrot_str_bitwise_and(PARROT_INTERP,
     ARGIN_NULLOK(const STRING *s1),
@@ -112,8 +103,7 @@
 PARROT_CANNOT_RETURN_NULL
 STRING * Parrot_str_concat(PARROT_INTERP,
     ARGIN_NULLOK(STRING *a),
-    ARGIN_NULLOK(STRING *b),
-    UINTVAL Uflags)
+    ARGIN_NULLOK(STRING *b))
         __attribute__nonnull__(1);
 
 PARROT_EXPORT
@@ -488,8 +478,6 @@
         __attribute__nonnull__(2)
         FUNC_MODIFIES(*tc);
 
-#define ASSERT_ARGS_Parrot_str_append __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp))
 #define ASSERT_ARGS_Parrot_str_bitwise_and __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp))
 #define ASSERT_ARGS_Parrot_str_bitwise_not __attribute__unused__ int _ASSERT_ARGS_CHECK = (\

Modified: branches/immutable_strings_part1/src/dynext.c
==============================================================================
--- branches/immutable_strings_part1/src/dynext.c	Thu Apr 15 13:58:03 2010	(r45693)
+++ branches/immutable_strings_part1/src/dynext.c	Thu Apr 15 14:30:45 2010	(r45694)
@@ -294,7 +294,7 @@
 
         for (i = 0; i < n; ++i) {
             ext = VTABLE_get_string_keyed_int(interp, share_ext, i);
-            full_name = Parrot_str_concat(interp, wo_ext, ext, 0);
+            full_name = Parrot_str_concat(interp, wo_ext, ext);
             path = Parrot_locate_runtime_file_str(interp, full_name,
                     PARROT_RUNTIME_FT_DYNEXT);
             if (path) {

Modified: branches/immutable_strings_part1/src/io/utf8.c
==============================================================================
--- branches/immutable_strings_part1/src/io/utf8.c	Thu Apr 15 13:58:03 2010	(r45693)
+++ branches/immutable_strings_part1/src/io/utf8.c	Thu Apr 15 14:30:45 2010	(r45694)
@@ -83,7 +83,7 @@
                 UNUSED(read);
 
                 s->strlen    = iter.charpos;
-                s            = Parrot_str_append(interp, s, s2);
+                s            = Parrot_str_concat(interp, s, s2);
                 /* String is updated. Poke into iterator to replace old string */
                 iter.str     = s;
                 *buf         = s;

Modified: branches/immutable_strings_part1/src/key.c
==============================================================================
--- branches/immutable_strings_part1/src/key.c	Thu Apr 15 13:58:03 2010	(r45693)
+++ branches/immutable_strings_part1/src/key.c	Thu Apr 15 14:30:45 2010	(r45694)
@@ -650,65 +650,65 @@
         switch (PObj_get_FLAGS(key) & KEY_type_FLAGS) {
           case KEY_integer_FLAG:
             GETATTR_Key_int_key(interp, key, int_key);
-            value = Parrot_str_append(interp, value,
-                    Parrot_str_from_int(interp, int_key));
+            value = Parrot_str_concat(interp, value,
+                        Parrot_str_from_int(interp, int_key));
             break;
           case KEY_number_FLAG:
             GETATTR_Key_int_key(interp, key, int_key);
-            value = Parrot_str_append(interp, value,
-                    Parrot_str_from_num(interp, (FLOATVAL)int_key));
+            value = Parrot_str_concat(interp, value,
+                        Parrot_str_from_num(interp, (FLOATVAL)int_key));
             break;
           case KEY_string_FLAG:
             GETATTR_Key_str_key(interp, key, str_key);
-            value = Parrot_str_append(interp, value, quote);
-            value = Parrot_str_append(interp, value, str_key);
-            value = Parrot_str_append(interp, value, quote);
+            value = Parrot_str_concat(interp, value, quote);
+            value = Parrot_str_concat(interp, value, str_key);
+            value = Parrot_str_concat(interp, value, quote);
             break;
           case KEY_pmc_FLAG:
-            value = Parrot_str_append(interp, value,
-                    VTABLE_get_string(interp, key));
+            value = Parrot_str_concat(interp, value,
+                        VTABLE_get_string(interp, key));
             break;
           case KEY_integer_FLAG | KEY_register_FLAG:
             GETATTR_Key_int_key(interp, key, int_key);
-            value = Parrot_str_append(interp, value,
+            value = Parrot_str_concat(interp, value,
                         Parrot_str_from_int(interp,
                             REG_INT(interp, int_key)));
             break;
           case KEY_number_FLAG | KEY_register_FLAG:
             GETATTR_Key_int_key(interp, key, int_key);
-            value = Parrot_str_append(interp, value,
+            value = Parrot_str_concat(interp, value,
                         Parrot_str_from_num(interp,
                             REG_NUM(interp, int_key)));
             break;
           case KEY_string_FLAG | KEY_register_FLAG:
-            value = Parrot_str_append(interp, value, quote);
+            value = Parrot_str_concat(interp, value, quote);
             GETATTR_Key_int_key(interp, key, int_key);
-            value = Parrot_str_append(interp, value,
+            value = Parrot_str_concat(interp, value,
                     REG_STR(interp, int_key));
-            value = Parrot_str_append(interp, value, quote);
+            value = Parrot_str_concat(interp, value, quote);
             break;
           case KEY_pmc_FLAG | KEY_register_FLAG:
             {
                 PMC *reg;
                 GETATTR_Key_int_key(interp, key, int_key);
                 reg = REG_PMC(interp, int_key);
-                value           = Parrot_str_append(interp, value,
-                                    VTABLE_get_string(interp, reg));
+                value = Parrot_str_concat(interp, value,
+                            VTABLE_get_string(interp, reg));
             }
             break;
           default:
-            value = Parrot_str_append(interp, value, CONST_STRING(interp, "Key type unknown"));
+            value = Parrot_str_concat(interp, value, CONST_STRING(interp, "Key type unknown"));
             break;
         }
 
         GETATTR_Key_next_key(interp, key, next_key);
         if (next_key)
-            value = Parrot_str_append(interp, value, semicolon);
+            value = Parrot_str_concat(interp, value, semicolon);
 
         GETATTR_Key_next_key(interp, key, key);
     }
 
-    value = Parrot_str_append(interp, value, Parrot_str_new(interp, " ]", 2));
+    value = Parrot_str_concat(interp, value, Parrot_str_new(interp, " ]", 2));
     return value;
 }
 

Modified: branches/immutable_strings_part1/src/library.c
==============================================================================
--- branches/immutable_strings_part1/src/library.c	Thu Apr 15 13:58:03 2010	(r45693)
+++ branches/immutable_strings_part1/src/library.c	Thu Apr 15 14:30:45 2010	(r45694)
@@ -181,7 +181,7 @@
 
         versionlib = VTABLE_get_string_keyed_str(interp, config_hash, libkey);
         entry      = VTABLE_get_string_keyed_str(interp, config_hash, verkey);
-        versionlib = Parrot_str_append(interp, versionlib, entry);
+        versionlib = Parrot_str_concat(interp, versionlib, entry);
 
         if (!VTABLE_get_integer_keyed_str(interp, config_hash, installed))
             builddir = VTABLE_get_string_keyed_str(interp,
@@ -202,15 +202,15 @@
         }
     }
     if (!STRING_IS_NULL(builddir)) {
-        entry = Parrot_str_concat(interp, builddir, CONST_STRING(interp, "/"), 0);
+        entry = Parrot_str_concat(interp, builddir, CONST_STRING(interp, "/"));
         VTABLE_push_string(interp, paths, entry);
-        entry = Parrot_str_concat(interp, builddir, CONST_STRING(interp, "/runtime/parrot/include/"), 0);
+        entry = Parrot_str_concat(interp, builddir, CONST_STRING(interp, "/runtime/parrot/include/"));
         VTABLE_push_string(interp, paths, entry);
     }
     entry = CONST_STRING(interp, "./");
     VTABLE_push_string(interp, paths, entry);
     if (!STRING_IS_NULL(versionlib)) {
-        entry = Parrot_str_concat(interp, versionlib, CONST_STRING(interp, "/include/"), 0);
+        entry = Parrot_str_concat(interp, versionlib, CONST_STRING(interp, "/include/"));
         VTABLE_push_string(interp, paths, entry);
     }
 
@@ -227,13 +227,13 @@
         }
     }
     if (!STRING_IS_NULL(builddir)) {
-        entry = Parrot_str_concat(interp, builddir, CONST_STRING(interp, "/runtime/parrot/library/"), 0);
+        entry = Parrot_str_concat(interp, builddir, CONST_STRING(interp, "/runtime/parrot/library/"));
         VTABLE_push_string(interp, paths, entry);
     }
     entry = CONST_STRING(interp, "./");
     VTABLE_push_string(interp, paths, entry);
     if (!STRING_IS_NULL(versionlib)) {
-        entry = Parrot_str_concat(interp, versionlib, CONST_STRING(interp, "/library/"), 0);
+        entry = Parrot_str_concat(interp, versionlib, CONST_STRING(interp, "/library/"));
         VTABLE_push_string(interp, paths, entry);
     }
 
@@ -242,13 +242,13 @@
     VTABLE_set_pmc_keyed_int(interp, lib_paths,
             PARROT_LIB_PATH_LANG, paths);
     if (!STRING_IS_NULL(builddir)) {
-        entry = Parrot_str_concat(interp, builddir, CONST_STRING(interp, "/runtime/parrot/languages/"), 0);
+        entry = Parrot_str_concat(interp, builddir, CONST_STRING(interp, "/runtime/parrot/languages/"));
         VTABLE_push_string(interp, paths, entry);
     }
     entry = CONST_STRING(interp, "./");
     VTABLE_push_string(interp, paths, entry);
     if (!STRING_IS_NULL(versionlib)) {
-        entry = Parrot_str_concat(interp, versionlib, CONST_STRING(interp, "/languages/"), 0);
+        entry = Parrot_str_concat(interp, versionlib, CONST_STRING(interp, "/languages/"));
         VTABLE_push_string(interp, paths, entry);
     }
 
@@ -257,13 +257,13 @@
     VTABLE_set_pmc_keyed_int(interp, lib_paths,
             PARROT_LIB_PATH_DYNEXT, paths);
     if (!STRING_IS_NULL(builddir)) {
-        entry = Parrot_str_concat(interp, builddir, CONST_STRING(interp, "/runtime/parrot/dynext/"), 0);
+        entry = Parrot_str_concat(interp, builddir, CONST_STRING(interp, "/runtime/parrot/dynext/"));
         VTABLE_push_string(interp, paths, entry);
     }
     entry = CONST_STRING(interp, "dynext/");
     VTABLE_push_string(interp, paths, entry);
     if (!STRING_IS_NULL(versionlib)) {
-        entry = Parrot_str_concat(interp, versionlib, CONST_STRING(interp, "/dynext/"), 0);
+        entry = Parrot_str_concat(interp, versionlib, CONST_STRING(interp, "/dynext/"));
         VTABLE_push_string(interp, paths, entry);
     }
 
@@ -419,7 +419,7 @@
 
     STRING * const nul = string_chr(interp, '\0');
 
-    path = Parrot_str_append(interp, path, nul);
+    path = Parrot_str_concat(interp, path, nul);
     path->bufused--;
     path->strlen--;
 
@@ -454,7 +454,7 @@
     /* make sure the path has a trailing slash before appending the file */
     if (Parrot_str_indexed(interp, path , path->strlen - 1)
          != Parrot_str_indexed(interp, path_separator_string, 0))
-        path = Parrot_str_append(interp, path , path_separator_string);
+        path = Parrot_str_concat(interp, path , path_separator_string);
 
     return path;
 }
@@ -479,7 +479,7 @@
 {
     ASSERT_ARGS(path_append)
     l_path = path_guarantee_trailing_separator(interp, l_path);
-    l_path = Parrot_str_append(interp, l_path, r_path);
+    l_path = Parrot_str_concat(interp, l_path, r_path);
 
     return l_path;
 }
@@ -507,7 +507,7 @@
 
     join = l_path;
     join = path_guarantee_trailing_separator(interp, join);
-    join = Parrot_str_append(interp, join, r_path);
+    join = Parrot_str_concat(interp, join, r_path);
 
     return join;
 }
@@ -584,7 +584,7 @@
             /* First try substituting .pbc for the .pir extension */
             if (Parrot_str_equal(interp, orig_ext, pir_extension)) {
                 STRING * const without_ext = Parrot_str_chopn(interp, test_path, 4);
-                test_path = Parrot_str_append(interp, without_ext, bytecode_extension);
+                test_path = Parrot_str_concat(interp, without_ext, bytecode_extension);
                 result = try_load_path(interp, test_path);
                 if (result)
                     return result;
@@ -592,12 +592,12 @@
             /* Next try substituting .pir, then .pasm for the .pbc extension */
             else if (Parrot_str_equal(interp, orig_ext, bytecode_extension)) {
                 STRING * const without_ext = Parrot_str_chopn(interp, test_path, 4);
-                test_path = Parrot_str_append(interp, without_ext, pir_extension);
+                test_path = Parrot_str_concat(interp, without_ext, pir_extension);
                 result = try_load_path(interp, test_path);
                 if (result)
                     return result;
 
-                test_path = Parrot_str_append(interp, without_ext, pasm_extension);
+                test_path = Parrot_str_concat(interp, without_ext, pasm_extension);
                 result = try_load_path(interp, test_path);
                 if (result)
                     return result;
@@ -610,7 +610,7 @@
             STRING * const orig_ext = Parrot_str_substr(interp, test_path, -5, 5);
             if (Parrot_str_equal(interp, orig_ext, pasm_extension)) {
                 STRING * const without_ext = Parrot_str_chopn(interp, test_path, 5);
-                test_path = Parrot_str_append(interp, without_ext, bytecode_extension);
+                test_path = Parrot_str_concat(interp, without_ext, bytecode_extension);
                 result = try_load_path(interp, test_path);
                 if (result)
                     return result;

Modified: branches/immutable_strings_part1/src/ops/string.ops
==============================================================================
--- branches/immutable_strings_part1/src/ops/string.ops	Thu Apr 15 13:58:03 2010	(r45693)
+++ branches/immutable_strings_part1/src/ops/string.ops	Thu Apr 15 14:30:45 2010	(r45694)
@@ -98,7 +98,7 @@
 =cut
 
 inline op concat(inout STR, in STR) :base_mem {
-    $1 = Parrot_str_append(interp, $1, $2);
+    $1 = Parrot_str_concat(interp, $1, $2);
 }
 
 inline op concat(invar PMC, invar PMC) :base_core {
@@ -110,7 +110,7 @@
 }
 
 inline op concat(out STR, in STR, in STR) :base_mem {
-    $1 = Parrot_str_concat(interp, $2, $3, 1);
+    $1 = Parrot_str_concat(interp, $2, $3);
 }
 
 inline op concat(invar PMC, invar PMC, in STR) :base_core {

Modified: branches/immutable_strings_part1/src/packdump.c
==============================================================================
--- branches/immutable_strings_part1/src/packdump.c	Thu Apr 15 13:58:03 2010	(r45693)
+++ branches/immutable_strings_part1/src/packdump.c	Thu Apr 15 14:30:45 2010	(r45694)
@@ -299,10 +299,10 @@
                     switch (sub->namespace_name->vtable->base_type) {
                       case enum_class_String:
                         namespace_description = Parrot_str_new(interp, "'", 1);
-                        namespace_description = Parrot_str_append(interp,
+                        namespace_description = Parrot_str_concat(interp,
                                         namespace_description,
                                         VTABLE_get_string(interp, sub->namespace_name));
-                        namespace_description = Parrot_str_append(interp,
+                        namespace_description = Parrot_str_concat(interp,
                                         namespace_description,
                                         Parrot_str_new(interp, "'", 1));
                         break;

Modified: branches/immutable_strings_part1/src/packfile.c
==============================================================================
--- branches/immutable_strings_part1/src/packfile.c	Thu Apr 15 13:58:03 2010	(r45693)
+++ branches/immutable_strings_part1/src/packfile.c	Thu Apr 15 14:30:45 2010	(r45694)
@@ -4759,10 +4759,10 @@
 
     /* Full path to language library is "abc/abc.pbc". */
     pbc = CONST_STRING(interp, "pbc");
-    wo_ext   = Parrot_str_concat(interp, lang_name, CONST_STRING(interp, "/"), 0);
-    wo_ext   = Parrot_str_append(interp, wo_ext, lang_name);
-    file_str = Parrot_str_concat(interp, wo_ext, CONST_STRING(interp, "."), 0);
-    file_str = Parrot_str_append(interp, file_str, pbc);
+    wo_ext   = Parrot_str_concat(interp, lang_name, CONST_STRING(interp, "/"));
+    wo_ext   = Parrot_str_concat(interp, wo_ext, lang_name);
+    file_str = Parrot_str_concat(interp, wo_ext, CONST_STRING(interp, "."));
+    file_str = Parrot_str_concat(interp, file_str, pbc);
 
     /* Check if the language is already loaded */
     is_loaded_hash = VTABLE_get_pmc_keyed_int(interp,
@@ -4789,11 +4789,11 @@
     found_path = Parrot_str_substr(interp, found_path, 0,
             Parrot_str_length(interp, found_path)-name_length);
 
-    Parrot_lib_add_path(interp, Parrot_str_append(interp, found_path, CONST_STRING(interp, "include/")),
+    Parrot_lib_add_path(interp, Parrot_str_concat(interp, found_path, CONST_STRING(interp, "include/")),
             PARROT_LIB_PATH_INCLUDE);
-    Parrot_lib_add_path(interp, Parrot_str_append(interp, found_path, CONST_STRING(interp, "dynext/")),
+    Parrot_lib_add_path(interp, Parrot_str_concat(interp, found_path, CONST_STRING(interp, "dynext/")),
             PARROT_LIB_PATH_DYNEXT);
-    Parrot_lib_add_path(interp, Parrot_str_append(interp, found_path, CONST_STRING(interp, "library/")),
+    Parrot_lib_add_path(interp, Parrot_str_concat(interp, found_path, CONST_STRING(interp, "library/")),
             PARROT_LIB_PATH_LIBRARY);
 
 

Modified: branches/immutable_strings_part1/src/pmc/bigint.pmc
==============================================================================
--- branches/immutable_strings_part1/src/pmc/bigint.pmc	Thu Apr 15 13:58:03 2010	(r45693)
+++ branches/immutable_strings_part1/src/pmc/bigint.pmc	Thu Apr 15 14:30:45 2010	(r45694)
@@ -1143,7 +1143,7 @@
 
     VTABLE STRING *get_repr() {
         STRING * const s = SELF.get_string();
-        return Parrot_str_append(INTERP, s, CONST_STRING(INTERP, "L"));
+        return Parrot_str_concat(INTERP, s, CONST_STRING(INTERP, "L"));
     }
 /*
 

Modified: branches/immutable_strings_part1/src/pmc/bignum.pmc
==============================================================================
--- branches/immutable_strings_part1/src/pmc/bignum.pmc	Thu Apr 15 13:58:03 2010	(r45693)
+++ branches/immutable_strings_part1/src/pmc/bignum.pmc	Thu Apr 15 14:30:45 2010	(r45694)
@@ -1509,7 +1509,7 @@
 
     VTABLE STRING *get_repr() {
         STRING *s = SELF.get_string();
-        return Parrot_str_append(INTERP, s, Parrot_str_new(interp, "N", 1));
+        return Parrot_str_concat(INTERP, s, Parrot_str_new(interp, "N", 1));
     }
 /*
 

Modified: branches/immutable_strings_part1/src/pmc/callcontext.pmc
==============================================================================
--- branches/immutable_strings_part1/src/pmc/callcontext.pmc	Thu Apr 15 13:58:03 2010	(r45693)
+++ branches/immutable_strings_part1/src/pmc/callcontext.pmc	Thu Apr 15 14:30:45 2010	(r45694)
@@ -679,16 +679,16 @@
         for (i = 0; i < num_positionals; ++i) {
             switch (c[i].type) {
               case INTCELL:
-                res = Parrot_str_append(INTERP, res, CONST_STRING(INTERP, "I"));
+                res = Parrot_str_concat(INTERP, res, CONST_STRING(INTERP, "I"));
                 break;
               case FLOATCELL:
-                res = Parrot_str_append(INTERP, res, CONST_STRING(INTERP, "N"));
+                res = Parrot_str_concat(INTERP, res, CONST_STRING(INTERP, "N"));
                 break;
               case STRINGCELL:
-                res = Parrot_str_append(INTERP, res, CONST_STRING(INTERP, "S"));
+                res = Parrot_str_concat(INTERP, res, CONST_STRING(INTERP, "S"));
                 break;
               case PMCCELL:
-                res = Parrot_str_append(INTERP, res, CONST_STRING(INTERP, "P"));
+                res = Parrot_str_concat(INTERP, res, CONST_STRING(INTERP, "P"));
                 break;
               default:
                 PARROT_FAILURE("Impossible flag");

Modified: branches/immutable_strings_part1/src/pmc/class.pmc
==============================================================================
--- branches/immutable_strings_part1/src/pmc/class.pmc	Thu Apr 15 13:58:03 2010	(r45693)
+++ branches/immutable_strings_part1/src/pmc/class.pmc	Thu Apr 15 14:30:45 2010	(r45694)
@@ -203,7 +203,7 @@
         STRING * const attrib_name = VTABLE_get_string_keyed_str(
             interp, cur_attrib, name_str);
 
-        STRING * const full_key    = Parrot_str_append(interp, fq_class, attrib_name);
+        STRING * const full_key    = Parrot_str_concat(interp, fq_class, attrib_name);
 
         /* Insert into hash, along with index. */
         VTABLE_set_integer_keyed_str(interp, attrib_index, full_key, cur_index);

Modified: branches/immutable_strings_part1/src/pmc/codestring.pmc
==============================================================================
--- branches/immutable_strings_part1/src/pmc/codestring.pmc	Thu Apr 15 13:58:03 2010	(r45693)
+++ branches/immutable_strings_part1/src/pmc/codestring.pmc	Thu Apr 15 14:30:45 2010	(r45694)
@@ -137,8 +137,8 @@
 
             while (I0 < I1) {
                 STRING * const S0 = VTABLE_get_string_keyed_int(INTERP, args, I0);
-                repl = Parrot_str_append(INTERP, repl, comma_space);
-                repl = Parrot_str_append(INTERP, repl, S0);
+                repl = Parrot_str_concat(INTERP, repl, comma_space);
+                repl = Parrot_str_concat(INTERP, repl, S0);
                 I0++;
             }
         }
@@ -157,10 +157,10 @@
 
     /* Add a newline if necessary */
     if ('\n' != Parrot_str_indexed(INTERP, fmt, Parrot_str_byte_length(INTERP, fmt) - 1))
-        fmt = Parrot_str_concat(INTERP, fmt, newline, 0);
+        fmt = Parrot_str_concat(INTERP, fmt, newline);
 
     GET_ATTR_str_val(INTERP, SELF, S1);
-    S1 = Parrot_str_concat(INTERP, S1, fmt, 0);
+    S1 = Parrot_str_concat(INTERP, S1, fmt);
     VTABLE_set_string_native(INTERP, SELF, S1);
 
     RETURN(PMC *SELF);
@@ -255,7 +255,7 @@
         RETURN(STRING *counter_as_string);
     }
     else {
-        STRING *result = Parrot_str_concat(INTERP, format, counter_as_string, 1);
+        STRING *result = Parrot_str_concat(INTERP, format, counter_as_string);
         RETURN(STRING *result);
     }
   }
@@ -280,8 +280,8 @@
     INTVAL is_unicode = 0;
     UNUSED(SELF);
 
-    escaped_str = Parrot_str_concat(INTERP, quote, escaped_str, 1);
-    escaped_str = Parrot_str_concat(INTERP, escaped_str, quote, 1);
+    escaped_str = Parrot_str_concat(INTERP, quote, escaped_str);
+    escaped_str = Parrot_str_concat(INTERP, escaped_str, quote);
     x_pos       = Parrot_str_find_index(INTERP, escaped_str, x, 0);
 
     if (x_pos != -1) {
@@ -296,7 +296,7 @@
 
     if (is_unicode) {
         STRING * const unicode = CONST_STRING(INTERP, "unicode:");
-        escaped_str            = Parrot_str_concat(INTERP, unicode, escaped_str, 1);
+        escaped_str            = Parrot_str_concat(INTERP, unicode, escaped_str);
     }
 
     RETURN(STRING *escaped_str);
@@ -363,8 +363,8 @@
                     STRING *S0   = VTABLE_get_string_keyed_int(INTERP, P0, index2);
                     (STRING *S0) = PCCINVOKE(INTERP, SELF, "escape", STRING *S0);
                     if (prefix)
-                        out = Parrot_str_append(INTERP, out, prefix);
-                    out    = Parrot_str_append(INTERP, out, S0);
+                        out = Parrot_str_concat(INTERP, out, prefix);
+                    out    = Parrot_str_concat(INTERP, out, S0);
                     prefix = semi;
                 }
             }
@@ -372,14 +372,14 @@
                 STRING *S0   = VTABLE_get_string_keyed_int(INTERP, args, index);
                 (STRING *S0) = PCCINVOKE(INTERP, SELF, "escape", STRING *S0);
                 if (prefix)
-                    out = Parrot_str_append(INTERP, out, prefix);
-                out    = Parrot_str_append(INTERP, out, S0);
+                    out = Parrot_str_concat(INTERP, out, prefix);
+                out    = Parrot_str_concat(INTERP, out, S0);
                 prefix = semi;
             }
         }
     }
 
-    out = Parrot_str_append(INTERP, out, close_bracket);
+    out = Parrot_str_concat(INTERP, out, close_bracket);
 
     RETURN(STRING *out);
 }

Modified: branches/immutable_strings_part1/src/pmc/filehandle.pmc
==============================================================================
--- branches/immutable_strings_part1/src/pmc/filehandle.pmc	Thu Apr 15 13:58:03 2010	(r45693)
+++ branches/immutable_strings_part1/src/pmc/filehandle.pmc	Thu Apr 15 14:30:45 2010	(r45694)
@@ -475,7 +475,7 @@
 
             do {
                 STRING * const part = Parrot_io_reads(INTERP, SELF, 0);
-                result = Parrot_str_append(INTERP, result, part);
+                result = Parrot_str_concat(INTERP, result, part);
 
                 if (Parrot_io_eof(INTERP, SELF))
                     break;

Modified: branches/immutable_strings_part1/src/pmc/fixedbooleanarray.pmc
==============================================================================
--- branches/immutable_strings_part1/src/pmc/fixedbooleanarray.pmc	Thu Apr 15 13:58:03 2010	(r45693)
+++ branches/immutable_strings_part1/src/pmc/fixedbooleanarray.pmc	Thu Apr 15 14:30:45 2010	(r45694)
@@ -283,9 +283,9 @@
 
         for (i = 0; i < elems; i++) {
             if (SELF.get_integer_keyed_int((INTVAL)i))
-                str = Parrot_str_concat(INTERP, str, one, 0);
+                str = Parrot_str_concat(INTERP, str, one);
             else
-                str = Parrot_str_concat(INTERP, str, zero, 0);
+                str = Parrot_str_concat(INTERP, str, zero);
         }
 
         return str;

Modified: branches/immutable_strings_part1/src/pmc/fixedintegerarray.pmc
==============================================================================
--- branches/immutable_strings_part1/src/pmc/fixedintegerarray.pmc	Thu Apr 15 13:58:03 2010	(r45693)
+++ branches/immutable_strings_part1/src/pmc/fixedintegerarray.pmc	Thu Apr 15 14:30:45 2010	(r45694)
@@ -279,13 +279,13 @@
 
         for (j = 0; j < n; ++j) {
             PMC * const val = SELF.get_pmc_keyed_int(j);
-            res = Parrot_str_append(INTERP, res, VTABLE_get_repr(INTERP, val));
+            res = Parrot_str_concat(INTERP, res, VTABLE_get_repr(INTERP, val));
 
             if (j < n - 1)
-                res = Parrot_str_append(INTERP, res, CONST_STRING(INTERP, ", "));
+                res = Parrot_str_concat(INTERP, res, CONST_STRING(INTERP, ", "));
         }
 
-        res = Parrot_str_append(INTERP, res, CONST_STRING(INTERP, " ]"));
+        res = Parrot_str_concat(INTERP, res, CONST_STRING(INTERP, " ]"));
         return res;
     }
 

Modified: branches/immutable_strings_part1/src/pmc/fixedpmcarray.pmc
==============================================================================
--- branches/immutable_strings_part1/src/pmc/fixedpmcarray.pmc	Thu Apr 15 13:58:03 2010	(r45693)
+++ branches/immutable_strings_part1/src/pmc/fixedpmcarray.pmc	Thu Apr 15 14:30:45 2010	(r45694)
@@ -222,12 +222,12 @@
         for (i = 0; i < n; ++i) {
             PMC * const val = SELF.get_pmc_keyed_int(i);
             if (i > 0)
-                res = Parrot_str_append(INTERP, res, CONST_STRING(INTERP, ", "));
+                res = Parrot_str_concat(INTERP, res, CONST_STRING(INTERP, ", "));
 
-            res = Parrot_str_append(INTERP, res, VTABLE_get_repr(INTERP, val));
+            res = Parrot_str_concat(INTERP, res, VTABLE_get_repr(INTERP, val));
         }
 
-        res = Parrot_str_append(INTERP, res, CONST_STRING(INTERP, ")"));
+        res = Parrot_str_concat(INTERP, res, CONST_STRING(INTERP, ")"));
 
         return res;
     }

Modified: branches/immutable_strings_part1/src/pmc/fixedstringarray.pmc
==============================================================================
--- branches/immutable_strings_part1/src/pmc/fixedstringarray.pmc	Thu Apr 15 13:58:03 2010	(r45693)
+++ branches/immutable_strings_part1/src/pmc/fixedstringarray.pmc	Thu Apr 15 14:30:45 2010	(r45694)
@@ -538,15 +538,15 @@
 
         for (j = 0; j < n; ++j) {
             STRING * const val = SELF.get_string_keyed_int(j);
-            res = Parrot_str_append(INTERP, res, CONST_STRING(INTERP, "\""));
-            res = Parrot_str_append(INTERP, res, val);
-            res = Parrot_str_append(INTERP, res, CONST_STRING(INTERP, "\""));
+            res = Parrot_str_concat(INTERP, res, CONST_STRING(INTERP, "\""));
+            res = Parrot_str_concat(INTERP, res, val);
+            res = Parrot_str_concat(INTERP, res, CONST_STRING(INTERP, "\""));
 
             if (j < n - 1)
-                res = Parrot_str_append(INTERP, res, CONST_STRING(INTERP, ", "));
+                res = Parrot_str_concat(INTERP, res, CONST_STRING(INTERP, ", "));
         }
 
-        res = Parrot_str_append(INTERP, res, CONST_STRING(INTERP, " ]"));
+        res = Parrot_str_concat(INTERP, res, CONST_STRING(INTERP, " ]"));
         return res;
     }
 

Modified: branches/immutable_strings_part1/src/pmc/hash.pmc
==============================================================================
--- branches/immutable_strings_part1/src/pmc/hash.pmc	Thu Apr 15 13:58:03 2010	(r45693)
+++ branches/immutable_strings_part1/src/pmc/hash.pmc	Thu Apr 15 14:30:45 2010	(r45694)
@@ -342,23 +342,23 @@
             Parrot_str_free_cstring(key_str);
 
             if (all_digit) {
-                res = Parrot_str_append(INTERP, res, key);
+                res = Parrot_str_concat(INTERP, res, key);
             }
             else {
-                res = Parrot_str_append(INTERP, res, CONST_STRING(INTERP, "'"));
-                res = Parrot_str_append(INTERP, res, key);
-                res = Parrot_str_append(INTERP, res, CONST_STRING(INTERP, "'"));
+                res = Parrot_str_concat(INTERP, res, CONST_STRING(INTERP, "'"));
+                res = Parrot_str_concat(INTERP, res, key);
+                res = Parrot_str_concat(INTERP, res, CONST_STRING(INTERP, "'"));
             }
 
-            res = Parrot_str_append(INTERP, res, CONST_STRING(INTERP, ": "));
+            res = Parrot_str_concat(INTERP, res, CONST_STRING(INTERP, ": "));
             val = SELF.get_pmc_keyed_str(key);
-            res = Parrot_str_append(INTERP, res, VTABLE_get_string(INTERP, val));
+            res = Parrot_str_concat(INTERP, res, VTABLE_get_string(INTERP, val));
 
             if (j < n - 1)
-                res = Parrot_str_append(INTERP, res, CONST_STRING(INTERP, ", "));
+                res = Parrot_str_concat(INTERP, res, CONST_STRING(INTERP, ", "));
         }
 
-        res = Parrot_str_append(INTERP, res, CONST_STRING(INTERP, "}"));
+        res = Parrot_str_concat(INTERP, res, CONST_STRING(INTERP, "}"));
 
         return res;
     }

Modified: branches/immutable_strings_part1/src/pmc/object.pmc
==============================================================================
--- branches/immutable_strings_part1/src/pmc/object.pmc	Thu Apr 15 13:58:03 2010	(r45693)
+++ branches/immutable_strings_part1/src/pmc/object.pmc	Thu Apr 15 14:30:45 2010	(r45694)
@@ -119,7 +119,7 @@
 
         /* Build a string representing the fully qualified attribute name. */
         STRING *fq_name = VTABLE_get_string(interp, cur_class);
-        fq_name         = Parrot_str_append(interp, fq_name, name);
+        fq_name         = Parrot_str_concat(interp, fq_name, name);
 
         /* Look up. */
         if (VTABLE_exists_keyed_str(interp, _class->attrib_index, fq_name)) {
@@ -160,7 +160,7 @@
     /* Build a string representing the fully qualified attribute name. */
     parent_class = Parrot_oo_get_class(interp, key);
     fq_name      = VTABLE_get_string(interp, parent_class);
-    fq_name      = Parrot_str_append(interp, fq_name, name);
+    fq_name      = Parrot_str_concat(interp, fq_name, name);
 
     /* Look up. */
     if (VTABLE_exists_keyed_str(interp, _class->attrib_index, fq_name)) {

Modified: branches/immutable_strings_part1/src/pmc/resizablepmcarray.pmc
==============================================================================
--- branches/immutable_strings_part1/src/pmc/resizablepmcarray.pmc	Thu Apr 15 13:58:03 2010	(r45693)
+++ branches/immutable_strings_part1/src/pmc/resizablepmcarray.pmc	Thu Apr 15 14:30:45 2010	(r45694)
@@ -660,13 +660,13 @@
 
         for (j = 0; j < n; ++j) {
             PMC * const val = SELF.get_pmc_keyed_int(j);
-            res      = Parrot_str_append(INTERP, res, VTABLE_get_repr(INTERP, val));
+            res      = Parrot_str_concat(INTERP, res, VTABLE_get_repr(INTERP, val));
 
             if (j < n - 1)
-                res = Parrot_str_append(INTERP, res, CONST_STRING(INTERP, ", "));
+                res = Parrot_str_concat(INTERP, res, CONST_STRING(INTERP, ", "));
         }
 
-        return Parrot_str_append(INTERP, res, CONST_STRING(INTERP, " ]"));
+        return Parrot_str_concat(INTERP, res, CONST_STRING(INTERP, " ]"));
     }
 
 /*

Modified: branches/immutable_strings_part1/src/pmc/scalar.pmc
==============================================================================
--- branches/immutable_strings_part1/src/pmc/scalar.pmc	Thu Apr 15 13:58:03 2010	(r45693)
+++ branches/immutable_strings_part1/src/pmc/scalar.pmc	Thu Apr 15 14:30:45 2010	(r45694)
@@ -632,7 +632,7 @@
 
     VTABLE PMC *concatenate(PMC *value, PMC *dest) {
         STRING * const s = Parrot_str_concat(INTERP, SELF.get_string(),
-            VTABLE_get_string(INTERP, value), 0);
+            VTABLE_get_string(INTERP, value));
 
         dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
@@ -642,7 +642,7 @@
 
     VTABLE PMC *concatenate_str(STRING *value, PMC *dest) {
         STRING * const s = Parrot_str_concat(INTERP,
-            SELF.get_string(), value, 0);
+            SELF.get_string(), value);
 
         dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
@@ -653,12 +653,12 @@
     VTABLE void i_concatenate(PMC *value) {
         STRING * const s = SELF.get_string();
         STRING * const v = VTABLE_get_string(INTERP, value);
-        SELF.set_string_native(Parrot_str_append(INTERP, s, v));
+        SELF.set_string_native(Parrot_str_concat(INTERP, s, v));
     }
 
     VTABLE void i_concatenate_str(STRING *value) {
         STRING * const s = SELF.get_string();
-        SELF.set_string_native(Parrot_str_append(INTERP, s, value));
+        SELF.set_string_native(Parrot_str_concat(INTERP, s, value));
     }
 
 /*

Modified: branches/immutable_strings_part1/src/pmc/stringhandle.pmc
==============================================================================
--- branches/immutable_strings_part1/src/pmc/stringhandle.pmc	Thu Apr 15 13:58:03 2010	(r45693)
+++ branches/immutable_strings_part1/src/pmc/stringhandle.pmc	Thu Apr 15 14:30:45 2010	(r45694)
@@ -376,7 +376,7 @@
             Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_PIO_ERROR,
                 "Cannot write to a filehandle not opened for write");
 
-        new_string = Parrot_str_append(interp, old_string, to_print);
+        new_string = Parrot_str_concat(interp, old_string, to_print);
 
         SET_ATTR_stringhandle(INTERP, SELF, new_string);
 

Modified: branches/immutable_strings_part1/src/runcore/profiling.c
==============================================================================
--- branches/immutable_strings_part1/src/runcore/profiling.c	Thu Apr 15 13:58:03 2010	(r45693)
+++ branches/immutable_strings_part1/src/runcore/profiling.c	Thu Apr 15 14:30:45 2010	(r45694)
@@ -387,12 +387,12 @@
                 i++;
                 i++; /* the root namespace has an empty name, so ignore it */
                 for (;i < MAX_NS_DEPTH; i++) {
-                    full_ns = Parrot_str_concat(interp, full_ns, ns_names[i], 0);
-                    full_ns = Parrot_str_concat(interp, full_ns, ns_separator, 0);
+                    full_ns = Parrot_str_concat(interp, full_ns, ns_names[i]);
+                    full_ns = Parrot_str_concat(interp, full_ns, ns_separator);
                 }
 
                 GETATTR_Sub_name(interp, preop_ctx->current_sub, sub_name);
-                full_ns = Parrot_str_concat(interp, full_ns, sub_name, 0);
+                full_ns = Parrot_str_concat(interp, full_ns, sub_name);
                 full_ns_cstr = Parrot_str_to_cstring(interp, full_ns);
 
                 pprof_data[PPROF_DATA_NAMESPACE] = (PPROF_DATA) full_ns_cstr;

Modified: branches/immutable_strings_part1/src/spf_render.c
==============================================================================
--- branches/immutable_strings_part1/src/spf_render.c	Thu Apr 15 13:58:03 2010	(r45693)
+++ branches/immutable_strings_part1/src/spf_render.c	Thu Apr 15 14:30:45 2010	(r45694)
@@ -77,7 +77,7 @@
         __attribute__nonnull__(3);
 
 PARROT_CANNOT_RETURN_NULL
-static STRING* str_append_w_flags(PARROT_INTERP,
+static STRING* str_concat_w_flags(PARROT_INTERP,
     ARGOUT(STRING *dest),
     ARGIN(const SpfInfo *info),
     ARGMOD(STRING *src),
@@ -96,7 +96,7 @@
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(info) \
     , PARROT_ASSERT_ARG(str))
-#define ASSERT_ARGS_str_append_w_flags __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_str_concat_w_flags __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(dest) \
     , PARROT_ASSERT_ARG(info) \
@@ -143,19 +143,19 @@
         if (!len || string_ord(interp, str, 0) != '-') {
             if (info->flags & FLAG_PLUS) {
                 STRING * const cs = CONST_STRING(interp, "+");
-                str = Parrot_str_concat(interp, cs, str, 0);
+                str = Parrot_str_concat(interp, cs, str);
                 len++;
             }
             else if (info->flags & FLAG_SPACE) {
                 STRING * const cs = CONST_STRING(interp, " ");
-                str = Parrot_str_concat(interp, cs, str, 0);
+                str = Parrot_str_concat(interp, cs, str);
                 len++;
             }
         }
 
         /* # 0x ... */
         if ((info->flags & FLAG_SHARP) && prefix) {
-            str = Parrot_str_concat(interp, prefix, str, 0);
+            str = Parrot_str_concat(interp, prefix, str);
             len += Parrot_str_byte_length(interp, prefix);
         }
         /* XXX sharp + fill ??? */
@@ -194,7 +194,7 @@
         STRING * const fill = Parrot_str_repeat(interp, filler, info->width - len);
 
         if (info->flags & FLAG_MINUS) { /* left-align */
-            str = Parrot_str_concat(interp, str, fill, 0);
+            str = Parrot_str_concat(interp, str, fill);
         }
         else {                  /* right-align */
             /* signed and zero padded */
@@ -205,11 +205,11 @@
                 STRING *ignored;
                 temp = Parrot_str_substr(interp, str, 1, len-1);
                 str = Parrot_str_chopn(interp, str, -1);
-                str = Parrot_str_append(interp, str, fill);
-                str = Parrot_str_append(interp, str, temp);
+                str = Parrot_str_concat(interp, str, fill);
+                str = Parrot_str_concat(interp, str, temp);
             }
             else {
-                str = Parrot_str_concat(interp, fill, str, 0);
+                str = Parrot_str_concat(interp, fill, str);
             }
         }
     }
@@ -218,7 +218,7 @@
 
 /*
 
-=item C<static STRING* str_append_w_flags(PARROT_INTERP, STRING *dest, const
+=item C<static STRING* str_concat_w_flags(PARROT_INTERP, STRING *dest, const
 SpfInfo *info, STRING *src, STRING *prefix)>
 
 Used by Parrot_sprintf_format.  Prepends supplied prefix for numeric
@@ -232,12 +232,12 @@
 
 PARROT_CANNOT_RETURN_NULL
 static STRING*
-str_append_w_flags(PARROT_INTERP, ARGOUT(STRING *dest), ARGIN(const SpfInfo *info),
+str_concat_w_flags(PARROT_INTERP, ARGOUT(STRING *dest), ARGIN(const SpfInfo *info),
         ARGMOD(STRING *src), ARGIN_NULLOK(STRING *prefix))
 {
-    ASSERT_ARGS(str_append_w_flags)
+    ASSERT_ARGS(str_concat_w_flags)
     src = handle_flags(interp, info, src, 1, prefix);
-    dest = Parrot_str_append(interp, dest, src);
+    dest = Parrot_str_concat(interp, dest, src);
     return dest;
 }
 
@@ -346,7 +346,7 @@
             if (len) {
                 substr = Parrot_str_substr(interp, pat, old, len);
                 /* XXX This shouldn't modify targ the pointer */
-                targ = Parrot_str_append(interp, targ, substr);
+                targ = Parrot_str_concat(interp, targ, substr);
             }
             len = 0;
             old = i;
@@ -600,7 +600,7 @@
                             {
                             STRING * const ts = string_chr(interp,
                                  (UINTVAL)obj->getint(interp, info.type, obj));
-                            targ = str_append_w_flags(interp, targ, &info, ts, NULL);
+                            targ = str_concat_w_flags(interp, targ, &info, ts, NULL);
                             }
                             break;
 
@@ -614,7 +614,7 @@
 
                             /* unsigned conversion - no plus */
                             info.flags &= ~FLAG_PLUS;
-                            targ        = str_append_w_flags(interp, targ,
+                            targ        = str_concat_w_flags(interp, targ,
                                             &info, ts, prefix);
                             }
                             break;
@@ -629,7 +629,7 @@
 
                             /* unsigned conversion - no plus */
                             info.flags &= ~FLAG_PLUS;
-                            targ        = str_append_w_flags(interp, targ,
+                            targ        = str_concat_w_flags(interp, targ,
                                             &info, ts, prefix);
                             }
                             break;
@@ -645,7 +645,7 @@
 
                             /* unsigned conversion - no plus */
                             info.flags &= ~FLAG_PLUS;
-                            targ        = str_append_w_flags(interp, targ,
+                            targ        = str_concat_w_flags(interp, targ,
                                             &info, ts, prefix);
                             }
                             break;
@@ -660,7 +660,7 @@
 
                             /* unsigned conversion - no plus */
                             info.flags &= ~FLAG_PLUS;
-                            targ        = str_append_w_flags(interp, targ,
+                            targ        = str_concat_w_flags(interp, targ,
                                             &info, ts, prefix);
                             }
                             break;
@@ -675,7 +675,7 @@
 
                             /* unsigned conversion - no plus */
                             info.flags &= ~FLAG_PLUS;
-                            targ        = str_append_w_flags(interp, targ,
+                            targ        = str_concat_w_flags(interp, targ,
                                             &info, ts, prefix);
                             }
                             break;
@@ -714,7 +714,7 @@
 #endif
                                 Parrot_str_free_cstring(tempstr);
                             }
-                            targ = Parrot_str_append(interp, targ, cstr2pstr(tc));
+                            targ = Parrot_str_concat(interp, targ, cstr2pstr(tc));
                             }
                             break;
 
@@ -726,7 +726,7 @@
                             STRING * const ts = Parrot_str_from_uint(interp, tc,
                                        (UHUGEINTVAL) (size_t) ptr, 16, 0);
 
-                            targ = str_append_w_flags(interp, targ, &info,
+                            targ = str_concat_w_flags(interp, targ, &info,
                                     ts, prefix);
                             }
                             break;
@@ -814,7 +814,7 @@
                             }
 #endif /* WIN32 */
 
-                            targ = Parrot_str_append(interp, targ, cstr2pstr(tc));
+                            targ = Parrot_str_concat(interp, targ, cstr2pstr(tc));
                             }
                             break;
 
@@ -834,7 +834,7 @@
                                                     string, 0, NULL);
                                 obj->index++;
 
-                                targ = Parrot_str_append(interp, targ, ts);
+                                targ = Parrot_str_concat(interp, targ, ts);
                                 break;
                             }
 
@@ -847,7 +847,7 @@
                             if (!STRING_IS_NULL(string)) {
                                 STRING * const ts = handle_flags(interp,
                                         &info, string, 0, NULL);
-                                targ = Parrot_str_append(interp, targ, ts);
+                                targ = Parrot_str_concat(interp, targ, ts);
                             }
                             }
                             break;
@@ -891,7 +891,7 @@
     }
     if (len) {
         substr = Parrot_str_substr(interp, pat, old, len);
-        targ = Parrot_str_append(interp, targ, substr);
+        targ = Parrot_str_concat(interp, targ, substr);
     }
 
     return targ;

Modified: branches/immutable_strings_part1/src/string/api.c
==============================================================================
--- branches/immutable_strings_part1/src/string/api.c	Thu Apr 15 13:58:03 2010	(r45693)
+++ branches/immutable_strings_part1/src/string/api.c	Thu Apr 15 14:30:45 2010	(r45694)
@@ -397,8 +397,7 @@
 
 /*
 
-=item C<STRING * Parrot_str_concat(PARROT_INTERP, STRING *a, STRING *b, UINTVAL
-Uflags)>
+=item C<STRING * Parrot_str_concat(PARROT_INTERP, STRING *a, STRING *b)>
 
 Concatenates two Parrot strings. If necessary, converts the second
 string's encoding and/or type to match those of the first string. If
@@ -414,31 +413,9 @@
 PARROT_CANNOT_RETURN_NULL
 STRING *
 Parrot_str_concat(PARROT_INTERP, ARGIN_NULLOK(STRING *a),
-            ARGIN_NULLOK(STRING *b), UINTVAL Uflags)
+            ARGIN_NULLOK(STRING *b))
 {
     ASSERT_ARGS(Parrot_str_concat)
-    return Parrot_str_append(interp, a, b);
-}
-
-
-/*
-
-=item C<STRING * Parrot_str_append(PARROT_INTERP, STRING *a, STRING *b)>
-
-Takes two Parrot strings and appends the second to the first, returning the
-result as a new string.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-PARROT_WARN_UNUSED_RESULT
-PARROT_CAN_RETURN_NULL
-STRING *
-Parrot_str_append(PARROT_INTERP, ARGMOD_NULLOK(STRING *a), ARGIN_NULLOK(STRING *b))
-{
-    ASSERT_ARGS(Parrot_str_append)
     const CHARSET   *cs;
     const ENCODING  *enc;
     STRING          *dest;
@@ -449,7 +426,7 @@
     /* If B isn't real, we just bail */
     const UINTVAL b_len = b ? Parrot_str_byte_length(interp, b) : 0;
     if (!b_len)
-        return a ? a : NULL;
+        return a;
 
     /* Is A real? */
     if (STRING_IS_NULL(a) || Buffer_bufstart(a) == NULL)
@@ -2502,7 +2479,7 @@
         else
             hex = Parrot_sprintf_c(interp, "\\u%04x", c);
 
-        result = Parrot_str_append(interp, result, hex);
+        result = Parrot_str_concat(interp, result, hex);
 
         /* adjust our insert idx */
         i += hex->strlen;


More information about the parrot-commits mailing list