[svn:parrot] r46198 - trunk/src/pmc

NotFound at svn.parrot.org NotFound at svn.parrot.org
Fri Apr 30 13:36:57 UTC 2010


Author: NotFound
Date: Fri Apr 30 13:36:57 2010
New Revision: 46198
URL: https://trac.parrot.org/parrot/changeset/46198

Log:
avoid pmc_new_temporary in codestring emit method, maybe slower but less crashy. Also use fixed instead of resizable string array

Modified:
   trunk/src/pmc/codestring.pmc

Modified: trunk/src/pmc/codestring.pmc
==============================================================================
--- trunk/src/pmc/codestring.pmc	Fri Apr 30 12:49:03 2010	(r46197)
+++ trunk/src/pmc/codestring.pmc	Fri Apr 30 13:36:57 2010	(r46198)
@@ -146,8 +146,7 @@
 
     GET_ATTR_str_val(INTERP, SELF, S1);
 
-    parts = Parrot_pmc_new_temporary(INTERP, enum_class_ResizableStringArray);
-    VTABLE_set_integer_native(INTERP, parts, 3);
+    parts = Parrot_pmc_new_init_int(INTERP, enum_class_FixedStringArray, 3);
     VTABLE_set_string_keyed_int(INTERP, parts, 0, S1);
     VTABLE_set_string_keyed_int(INTERP, parts, 1, fmt);
 
@@ -157,7 +156,6 @@
 
     S1 = Parrot_str_join(INTERP, STRINGNULL, parts);
     VTABLE_set_string_native(INTERP, SELF, S1);
-    Parrot_pmc_free_temporary(INTERP, parts);
 
     RETURN(PMC *SELF);
   }


More information about the parrot-commits mailing list