Author: allison Date: Wed Jan 28 19:02:00 2009 New Revision: 36129 Modified: branches/pdd28str_part2/docs/debug.pod branches/pdd28str_part2/include/parrot/string_funcs.h branches/pdd28str_part2/src/inter_call.c branches/pdd28str_part2/src/key.c branches/pdd28str_part2/src/pic.c branches/pdd28str_part2/src/pmc/codestring.pmc branches/pdd28str_part2/src/string/api.c branches/pdd28str_part2/src/string/encoding/fixed_8.c branches/pdd28str_part2/src/string/encoding/ucs2.c branches/pdd28str_part2/src/string/encoding/utf16.c branches/pdd28str_part2/src/string/encoding/utf8.c
Log: [pdd28str] Renaming 'Parrot_str_new_COW'. Modified: branches/pdd28str_part2/docs/debug.pod ============================================================================== --- branches/pdd28str_part2/docs/debug.pod (original) +++ branches/pdd28str_part2/docs/debug.pod Wed Jan 28 19:02:00 2009 @@ -177,7 +177,7 @@ Backtrace - Obtained 15 stack frames (max trace depth is 32). (unknown) Parrot_confess - Parrot_make_COW_reference + Parrot_str_new_COW Parrot_String_get_string Parrot_set_s_p (unknown) @@ -266,10 +266,10 @@ #0 Parrot_confess (cond=0xb7eeda65 "s", file=0xb7eeda58 "src/string.c", line=129) at src/exceptions.c:767 No locals. - #1 0xb7c433b1 in Parrot_make_COW_reference (interp=0x804e008, s=0x0) + #1 0xb7c433b1 in Parrot_str_new_COW (interp=0x804e008, s=0x0) at src/string.c:129 d = (STRING *) 0x81c21b8 - __PRETTY_FUNCTION__ = "Parrot_make_COW_reference" + __PRETTY_FUNCTION__ = "Parrot_str_new_COW" #2 0xb7e40db3 in Parrot_String_get_string (interp=0x804e008, pmc=0x81c8578) at src/pmc/string.c:310 No locals. Modified: branches/pdd28str_part2/include/parrot/string_funcs.h ============================================================================== --- branches/pdd28str_part2/include/parrot/string_funcs.h (original) +++ branches/pdd28str_part2/include/parrot/string_funcs.h Wed Jan 28 19:02:00 2009 @@ -36,7 +36,7 @@ PARROT_EXPORT PARROT_CANNOT_RETURN_NULL PARROT_WARN_UNUSED_RESULT -STRING * Parrot_make_COW_reference(PARROT_INTERP, ARGMOD(STRING *s)) +STRING * Parrot_str_new_COW(PARROT_INTERP, ARGMOD(STRING *s)) __attribute__nonnull__(1) __attribute__nonnull__(2) FUNC_MODIFIES(*s); @@ -560,7 +560,7 @@ #define ASSERT_ARGS_const_string __attribute__unused__ int _ASSERT_ARGS_CHECK = \ PARROT_ASSERT_ARG(interp) \ || PARROT_ASSERT_ARG(buffer) -#define ASSERT_ARGS_Parrot_make_COW_reference __attribute__unused__ int _ASSERT_ARGS_CHECK = \ +#define ASSERT_ARGS_Parrot_str_new_COW __attribute__unused__ int _ASSERT_ARGS_CHECK = \ PARROT_ASSERT_ARG(interp) \ || PARROT_ASSERT_ARG(s) #define ASSERT_ARGS_Parrot_reuse_COW_reference __attribute__unused__ int _ASSERT_ARGS_CHECK = \ Modified: branches/pdd28str_part2/src/inter_call.c ============================================================================== --- branches/pdd28str_part2/src/inter_call.c (original) +++ branches/pdd28str_part2/src/inter_call.c Wed Jan 28 19:02:00 2009 @@ -712,7 +712,7 @@ { /* ensure that callees don't modify constant caller strings */ if (constant) - UVal_str(st->val) = Parrot_make_COW_reference(interp, + UVal_str(st->val) = Parrot_str_new_COW(interp, st->src.ctx->constants[idx]->u.string); else UVal_str(st->val) = CTX_REG_STR(st->src.ctx, idx); Modified: branches/pdd28str_part2/src/key.c ============================================================================== --- branches/pdd28str_part2/src/key.c (original) +++ branches/pdd28str_part2/src/key.c Wed Jan 28 19:02:00 2009 @@ -423,14 +423,14 @@ { STRING *s = PMC_str_val(key); if (s) - s = Parrot_make_COW_reference(interp, s); + s = Parrot_str_new_COW(interp, s); return s; } case KEY_string_FLAG | KEY_register_FLAG: { STRING *s = REG_STR(interp, PMC_int_val(key)); if (s) - s = Parrot_make_COW_reference(interp, s); + s = Parrot_str_new_COW(interp, s); return s; } /* PMC_pmc_val(key)); */ Modified: branches/pdd28str_part2/src/pic.c ============================================================================== --- branches/pdd28str_part2/src/pic.c (original) +++ branches/pdd28str_part2/src/pic.c Wed Jan 28 19:02:00 2009 @@ -590,7 +590,7 @@ STRING *argS = *(STRING * const *)(src_base + ((const opcode_t *)src)[i]); if (argS && PObj_constant_TEST(argS)) - argS = Parrot_make_COW_reference(interp, argS); + argS = Parrot_str_new_COW(interp, argS); *(STRING **)(dest_base + ((const opcode_t*)dest)[i]) = argS; } @@ -599,7 +599,7 @@ { STRING *argS = (STRING *)(src)[i]; if (argS && PObj_constant_TEST(argS)) - argS = Parrot_make_COW_reference(interp, argS); + argS = Parrot_str_new_COW(interp, argS); *(STRING **)(dest_base + ((const opcode_t *)dest)[i]) = argS; } break; Modified: branches/pdd28str_part2/src/pmc/codestring.pmc ============================================================================== --- branches/pdd28str_part2/src/pmc/codestring.pmc (original) +++ branches/pdd28str_part2/src/pmc/codestring.pmc Wed Jan 28 19:02:00 2009 @@ -69,7 +69,7 @@ INTVAL replen = 0; INTVAL I0, I1; - fmt = Parrot_make_COW_reference(INTERP, fmt); + fmt = Parrot_str_new_COW(INTERP, fmt); while (pos >= 0) { pos += replen; @@ -88,7 +88,7 @@ } else if (0 == string_equal(INTERP, key, comma)) { repl = VTABLE_get_string_keyed_int(INTERP, args, 0); - repl = Parrot_make_COW_reference(INTERP, repl); + repl = Parrot_str_new_COW(INTERP, repl); I1 = VTABLE_elements(INTERP, args); I0 = 1; Modified: branches/pdd28str_part2/src/string/api.c ============================================================================== --- branches/pdd28str_part2/src/string/api.c (original) +++ branches/pdd28str_part2/src/string/api.c Wed Jan 28 19:02:00 2009 @@ -121,9 +121,9 @@ /* -=item C<STRING * Parrot_make_COW_reference> +=item C<STRING * Parrot_str_new_COW> -Creates a copy-on-write string by cloning a string header without +Creates a copy-on-write string, cloning a string header without allocating a new buffer. =cut @@ -134,9 +134,9 @@ PARROT_CANNOT_RETURN_NULL PARROT_WARN_UNUSED_RESULT STRING * -Parrot_make_COW_reference(PARROT_INTERP, ARGMOD(STRING *s)) +Parrot_str_new_COW(PARROT_INTERP, ARGMOD(STRING *s)) { - ASSERT_ARGS(Parrot_make_COW_reference) + ASSERT_ARGS(Parrot_str_new_COW) STRING *d; if (PObj_constant_TEST(s)) { @@ -233,7 +233,7 @@ dest = Parrot_reuse_COW_reference(interp, src, dest); } else - dest = Parrot_make_COW_reference(interp, src); + dest = Parrot_str_new_COW(interp, src); return dest; } @@ -1022,7 +1022,7 @@ string_copy(PARROT_INTERP, ARGMOD(STRING *s)) { ASSERT_ARGS(string_copy) - return Parrot_make_COW_reference(interp, s); + return Parrot_str_new_COW(interp, s); } Modified: branches/pdd28str_part2/src/string/encoding/fixed_8.c ============================================================================== --- branches/pdd28str_part2/src/string/encoding/fixed_8.c (original) +++ branches/pdd28str_part2/src/string/encoding/fixed_8.c Wed Jan 28 19:02:00 2009 @@ -369,7 +369,7 @@ get_bytes(PARROT_INTERP, ARGIN(STRING *source_string), UINTVAL offset, UINTVAL count) { ASSERT_ARGS(get_bytes) - STRING * const return_string = Parrot_make_COW_reference(interp, + STRING * const return_string = Parrot_str_new_COW(interp, source_string); return_string->encoding = source_string->encoding; return_string->charset = source_string->charset; Modified: branches/pdd28str_part2/src/string/encoding/ucs2.c ============================================================================== --- branches/pdd28str_part2/src/string/encoding/ucs2.c (original) +++ branches/pdd28str_part2/src/string/encoding/ucs2.c Wed Jan 28 19:02:00 2009 @@ -335,7 +335,7 @@ get_codepoints(PARROT_INTERP, ARGIN(STRING *src), UINTVAL offset, UINTVAL count) { ASSERT_ARGS(get_codepoints) - STRING * const return_string = Parrot_make_COW_reference(interp, src); + STRING * const return_string = Parrot_str_new_COW(interp, src); #if PARROT_HAS_ICU return_string->strstart = (char*)src->strstart + offset * sizeof (UChar); return_string->bufused = count * sizeof (UChar); Modified: branches/pdd28str_part2/src/string/encoding/utf16.c ============================================================================== --- branches/pdd28str_part2/src/string/encoding/utf16.c (original) +++ branches/pdd28str_part2/src/string/encoding/utf16.c Wed Jan 28 19:02:00 2009 @@ -455,7 +455,7 @@ ASSERT_ARGS(get_codepoints) String_iter iter; UINTVAL start; - STRING * const return_string = Parrot_make_COW_reference(interp, src); + STRING * const return_string = Parrot_str_new_COW(interp, src); iter_init(interp, src, &iter); iter.set_position(interp, &iter, offset); Modified: branches/pdd28str_part2/src/string/encoding/utf8.c ============================================================================== --- branches/pdd28str_part2/src/string/encoding/utf8.c (original) +++ branches/pdd28str_part2/src/string/encoding/utf8.c Wed Jan 28 19:02:00 2009 @@ -742,7 +742,7 @@ { ASSERT_ARGS(get_codepoints) - STRING * const return_string = Parrot_make_COW_reference(interp, src); + STRING * const return_string = Parrot_str_new_COW(interp, src); String_iter iter; UINTVAL start; @@ -779,7 +779,7 @@ get_bytes(PARROT_INTERP, ARGMOD(STRING *src), UINTVAL offset, UINTVAL count) { ASSERT_ARGS(get_bytes) - STRING * const return_string = Parrot_make_COW_reference(interp, src); + STRING * const return_string = Parrot_str_new_COW(interp, src); return_string->encoding = src->encoding; /* XXX */ return_string->charset = src->charset;