[svn:parrot] r41875 - branches/pcc_reapply/src/call
bacek at svn.parrot.org
bacek at svn.parrot.org
Thu Oct 15 09:01:06 UTC 2009
Author: bacek
Date: Thu Oct 15 09:01:06 2009
New Revision: 41875
URL: https://trac.parrot.org/parrot/changeset/41875
Log:
Create final result in single shot, not repeatedely in loop in dissect_aggregate_arg.
Modified:
branches/pcc_reapply/src/call/args.c
Modified: branches/pcc_reapply/src/call/args.c
==============================================================================
--- branches/pcc_reapply/src/call/args.c Thu Oct 15 09:00:28 2009 (r41874)
+++ branches/pcc_reapply/src/call/args.c Thu Oct 15 09:01:06 2009 (r41875)
@@ -675,8 +675,8 @@
for (index = 0; index < elements; index++) {
VTABLE_push_pmc(interp, call_object,
VTABLE_get_pmc_keyed_int(interp, aggregate, index));
- sub_string = Parrot_str_append(interp, sub_string, CONST_STRING(interp, "P"));
}
+ sub_string = Parrot_str_append(interp, sub_string, Parrot_str_repeat(interp, CONST_STRING(interp, "P"), index));
}
else if (VTABLE_does(interp, aggregate, CONST_STRING(interp, "hash"))) {
INTVAL elements = VTABLE_elements(interp, aggregate);
@@ -693,8 +693,8 @@
PARROT_ASSERT(name);
VTABLE_set_pmc_keyed_str(interp, call_object, name,
VTABLE_get_pmc_keyed_str(interp, aggregate, name));
- sub_string = Parrot_str_append(interp, sub_string, CONST_STRING(interp, "SnP"));
}
+ sub_string = Parrot_str_append(interp, sub_string, Parrot_str_repeat(interp, CONST_STRING(interp, "SnP"), index));
}
}
else {
More information about the parrot-commits
mailing list