[svn:parrot] r38237 - branches/pcc_rewiring/src
allison at svn.parrot.org
allison at svn.parrot.org
Mon Apr 20 20:43:38 UTC 2009
Author: allison
Date: Mon Apr 20 20:43:38 2009
New Revision: 38237
URL: https://trac.parrot.org/parrot/changeset/38237
Log:
[pcc] Use a resizable Integer array, instead of trying to calculate it
based on the length of a string that isn't the same length as the array
needs to be.
Modified:
branches/pcc_rewiring/src/multidispatch.c
Modified: branches/pcc_rewiring/src/multidispatch.c
==============================================================================
--- branches/pcc_rewiring/src/multidispatch.c Mon Apr 20 20:09:36 2009 (r38236)
+++ branches/pcc_rewiring/src/multidispatch.c Mon Apr 20 20:43:38 2009 (r38237)
@@ -724,26 +724,13 @@
Parrot_mmd_build_type_tuple_from_sig_obj(PARROT_INTERP, ARGIN(PMC *sig_obj))
{
ASSERT_ARGS(Parrot_mmd_build_type_tuple_from_sig_obj)
- PMC * const type_tuple = pmc_new(interp, enum_class_FixedIntegerArray);
+ PMC * const type_tuple = pmc_new(interp, enum_class_ResizableIntegerArray);
STRING *string_sig = VTABLE_get_string(interp, sig_obj);
const INTVAL sig_len = Parrot_str_byte_length(interp, string_sig);
INTVAL tuple_size = 0;
INTVAL args_ended = 0;
INTVAL i, seen_invocant = 0;
- /* First calculate the number of arguments participating in MMD */
- for (i = 0; i < sig_len; ++i) {
- INTVAL type = Parrot_str_indexed(interp, string_sig, i);
- if (type == '-')
- break;
- if (type == 'i')
- continue;
-
- tuple_size++;
- }
-
- VTABLE_set_integer_native(interp, type_tuple, tuple_size);
-
for (i = 0; i < sig_len; ++i) {
INTVAL type = Parrot_str_indexed(interp, string_sig, i + seen_invocant);
if (args_ended)
More information about the parrot-commits
mailing list