Author: chromatic
Date: Thu Dec 18 14:04:36 2008
New Revision: 34087
Modified:
trunk/DEPRECATED.pod
trunk/include/parrot/multidispatch.h
trunk/src/multidispatch.c
Log:
[MMD] Removed deprecated Parrot_MMD_search_default_infix() and
Parrot_mmd_search_default() functions.
Modified: trunk/DEPRECATED.pod
==============================================================================
--- trunk/DEPRECATED.pod (original)
+++ trunk/DEPRECATED.pod Thu Dec 18 14:04:36 2008
@@ -126,8 +126,7 @@
=item Old-style MMD functions [post 0.7.1]
-Parrot_MMD_search_default_infix,
-Parrot_mmd_search_default, mmd_cvt_to_types.
+mmd_cvt_to_types.
See RT #60626.
Modified: trunk/include/parrot/multidispatch.h
==============================================================================
--- trunk/include/parrot/multidispatch.h (original)
+++ trunk/include/parrot/multidispatch.h Thu Dec 18 14:04:36 2008
@@ -212,16 +212,6 @@
__attribute__nonnull__(3);
PARROT_EXPORT
-PARROT_CANNOT_RETURN_NULL
-PARROT_WARN_UNUSED_RESULT
-PMC * Parrot_MMD_search_default_infix(PARROT_INTERP,
- ARGIN(STRING *meth),
- INTVAL left_type,
- INTVAL right_type)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_EXPORT
PARROT_CAN_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
PMC * Parrot_mmd_sort_manhattan(PARROT_INTERP, ARGIN(PMC *candidates))
Modified: trunk/src/multidispatch.c
==============================================================================
--- trunk/src/multidispatch.c (original)
+++ trunk/src/multidispatch.c Thu Dec 18 14:04:36 2008
@@ -172,15 +172,6 @@
__attribute__nonnull__(3)
__attribute__nonnull__(4);
-PARROT_CAN_RETURN_NULL
-PARROT_WARN_UNUSED_RESULT
-static PMC* Parrot_mmd_search_default(PARROT_INTERP,
- ARGIN(STRING *meth),
- ARGIN(PMC *arg_tuple))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- __attribute__nonnull__(3);
-
PARROT_CANNOT_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
static PMC* Parrot_mmd_search_scopes(PARROT_INTERP, ARGIN(STRING *meth))
@@ -551,35 +542,6 @@
/*
-=item C<PMC * Parrot_MMD_search_default_infix>
-
-RT #48260: Not yet documented!!!
-
-{{**DEPRECATE**}}
-
-=cut
-
-*/
-
-PARROT_EXPORT
-PARROT_CANNOT_RETURN_NULL
-PARROT_WARN_UNUSED_RESULT
-PMC *
-Parrot_MMD_search_default_infix(PARROT_INTERP, ARGIN(STRING *meth),
- INTVAL left_type, INTVAL right_type)
-{
- PMC * const arg_tuple = pmc_new(interp, enum_class_FixedIntegerArray);
-
- VTABLE_set_integer_native(interp, arg_tuple, 2);
- VTABLE_set_integer_keyed_int(interp, arg_tuple, 0, left_type);
- VTABLE_set_integer_keyed_int(interp, arg_tuple, 1, right_type);
-
- return Parrot_mmd_search_default(interp, meth, arg_tuple);
-}
-
-
-/*
-
=item C<PMC * Parrot_mmd_sort_manhattan_by_sig_pmc>
Given an array PMC (usually a MultiSub) and a CallSignature PMC, sorts the mmd
@@ -743,61 +705,6 @@
/*
-=item C<static PMC* Parrot_mmd_search_default>
-
-Default implementation of MMD search. Search scopes for candidates, walk the
-class hierarchy, sort all candidates by their Manhattan distance, and return
-result
-
-{{**DEPRECATE?? **}}
-
-=cut
-
-*/
-
-PARROT_CAN_RETURN_NULL
-PARROT_WARN_UNUSED_RESULT
-static PMC*
-Parrot_mmd_search_default(PARROT_INTERP, ARGIN(STRING *meth), ARGIN(PMC
*arg_tuple))
-{
- /* 2) create a list of matching functions */
- PMC * const candidate_list = Parrot_mmd_search_scopes(interp, meth);
-
- /*
- * 3) if list is empty fail
- * if the first found function is a plain Sub: finito
- */
- INTVAL n = VTABLE_elements(interp, candidate_list);
-
- if (n == 1) {
- PMC * const pmc = VTABLE_get_pmc_keyed_int(interp, candidate_list,
0);
- STRING * const _sub = CONST_STRING(interp, "Sub");
-
- if (VTABLE_isa(interp, pmc, _sub))
- return pmc;
- }
-
- /*
- * 4) first was a MultiSub - go through all found MultiSubs and check
- * the first arguments MRO, add all MultiSubs and plain methods,
- * where the first argument matches
- */
- Parrot_mmd_search_classes(interp, meth, arg_tuple, candidate_list, 0);
- n = VTABLE_elements(interp, candidate_list);
- if (!n)
- return NULL;
-
- /* 5) sort the list */
-
- if (n > 1)
- return Parrot_mmd_sort_candidates(interp, arg_tuple, candidate_list);
-
- return VTABLE_get_pmc_keyed_int(interp, candidate_list, 0);
-}
-
-
-/*
-
=item C<static void Parrot_mmd_search_classes>
Search all the classes in all MultiSubs of the candidates C<cl> and return