[svn:parrot] r41599 - trunk/src
bacek at svn.parrot.org
bacek at svn.parrot.org
Thu Oct 1 22:19:37 UTC 2009
Author: bacek
Date: Thu Oct 1 22:19:37 2009
New Revision: 41599
URL: https://trac.parrot.org/parrot/changeset/41599
Log:
[cage] Don't create "constant" String for HLL_info entry_name. HLL_info isn't constant and will mark keys during GC anyway.
Modified:
trunk/src/hll.c
Modified: trunk/src/hll.c
==============================================================================
--- trunk/src/hll.c Thu Oct 1 22:19:16 2009 (r41598)
+++ trunk/src/hll.c Thu Oct 1 22:19:37 2009 (r41599)
@@ -90,14 +90,7 @@
PMC * const entry = constant_pmc_new(interp, enum_class_FixedPMCArray);
if (entry_name && !STRING_IS_EMPTY(entry_name)) {
- char * const cstring = Parrot_str_to_cstring(interp, entry_name);
- const UINTVAL len = Parrot_str_byte_length(interp, entry_name);
- STRING *const_name = Parrot_str_new_init(interp, cstring,
- len, PARROT_DEFAULT_ENCODING, PARROT_DEFAULT_CHARSET,
- PObj_constant_FLAG);
-
- Parrot_str_free_cstring(cstring);
- VTABLE_set_pmc_keyed_str(interp, hll_info, const_name, entry);
+ VTABLE_set_pmc_keyed_str(interp, hll_info, entry_name, entry);
}
else
VTABLE_push_pmc(interp, hll_info, entry);
More information about the parrot-commits
mailing list