# New Ticket Created by Andrew Whitworth
# Please include the string: [perl #58090]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=58090 >
The attached patch deprecates the function
src/multidispatch.c:mmd_creatE_builtin_multi_meth_2, and folds all the
functionality from that into the mmd_create_builtin_multi_meth
function instead. The former was just a tail call to the later, and
the later was not called from anywhere else in the codebase that I
could find. This patch is probably dependent on #58088, or it might
not apply cleanly.
--Andrew Whitworth
Index: src/multidispatch.c
===================================================================
--- src/multidispatch.c (revision 30314)
+++ src/multidispatch.c (working copy)
@@ -89,15 +89,6 @@
__attribute__nonnull__(2)
__attribute__nonnull__(4);
-static void Parrot_mmd_create_builtin_multi_meth_2(PARROT_INTERP,
- ARGIN(PMC *ns),
- INTVAL func_nr,
- INTVAL type,
- INTVAL right,
- funcptr_t func_ptr)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
PARROT_CANNOT_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
static PMC* Parrot_mmd_cvt_to_types(PARROT_INTERP, ARGIN(PMC *multi_sig))
@@ -1896,7 +1887,7 @@
/*
-=item C<static void mmd_create_builtin_multi_meth_2>
+=item C<static void mmd_create_builtin_multi_meth>
RT #48260: Not yet documented!!!
@@ -1905,11 +1896,14 @@
*/
static void
-mmd_create_builtin_multi_meth_2(PARROT_INTERP, ARGIN(PMC *ns),
- INTVAL func_nr, INTVAL type, INTVAL right, funcptr_t func_ptr)
+mmd_create_builtin_multi_meth(PARROT_INTERP, ARGIN(PMC *ns), INTVAL type,
+ ARGIN(const MMD_init *entry))
{
const char *short_name;
char signature[6], val_sig;
+ INTVAL func_nr = entry->func_nr;
+ INTVAL right = entry->right;
+ funcptr_t func_ptr = entry->func_ptr;
STRING *meth_name;
PMC *method, *multi, *_class, *multi_sig;
@@ -1998,28 +1992,8 @@
VTABLE_push_pmc(interp, multi, method);
}
-
/*
-=item C<static void mmd_create_builtin_multi_meth>
-
-RT #48260: Not yet documented!!!
-
-=cut
-
-*/
-
-static void
-mmd_create_builtin_multi_meth(PARROT_INTERP, ARGIN(PMC *ns), INTVAL type,
- ARGIN(const MMD_init *entry))
-{
- mmd_create_builtin_multi_meth_2(interp, ns,
- entry->func_nr, type, entry->right, entry->func_ptr);
-}
-
-
-/*
-
=item C<void Parrot_mmd_register_table>
Register MMD functions for this PMC type.