[svn:parrot] r41806 - branches/pcc_reapply/src

tene at svn.parrot.org tene at svn.parrot.org
Sat Oct 10 21:21:21 UTC 2009


Author: tene
Date: Sat Oct 10 21:21:21 2009
New Revision: 41806
URL: https://trac.parrot.org/parrot/changeset/41806

Log:
[pcc] Stop build mmd type tuples on named and flat parameters

Modified:
   branches/pcc_reapply/src/multidispatch.c

Modified: branches/pcc_reapply/src/multidispatch.c
==============================================================================
--- branches/pcc_reapply/src/multidispatch.c	Sat Oct 10 21:10:32 2009	(r41805)
+++ branches/pcc_reapply/src/multidispatch.c	Sat Oct 10 21:21:21 2009	(r41806)
@@ -684,9 +684,16 @@
                         i, enum_type_FLOATVAL);
                 break;
             case 'S':
-                VTABLE_set_integer_keyed_int(interp, type_tuple,
-                        i, enum_type_STRING);
-                break;
+                {
+                    INTVAL type_lookahead = Parrot_str_indexed(interp, string_sig, (i + 1));
+                    if (type_lookahead == 'n') {
+                        args_ended = 1;
+                        break;
+                    }
+                    VTABLE_set_integer_keyed_int(interp, type_tuple,
+                            i, enum_type_STRING);
+                    break;
+                }
             case 'P':
             {
                 INTVAL type_lookahead = Parrot_str_indexed(interp, string_sig, (i + 1));
@@ -697,6 +704,10 @@
                             "Multiple Dispatch: only the first argument can be an invocant");
                     seen_invocant = 1;
                 }
+                else if (type_lookahead == 'f') {
+                    args_ended = 1;
+                    break;
+                }
                 else {
                     PMC *pmc_arg = VTABLE_get_pmc_keyed_int(interp, sig_obj, i);
                     if (PMC_IS_NULL(pmc_arg))


More information about the parrot-commits mailing list