From 254b3a5a80e98f1daa72e596b9e6662d6259e9e6 Mon Sep 17 00:00:00 2001 From: jnthn Date: Wed, 22 Jul 2009 17:54:40 +0200 Subject: [PATCH] When we have a named slurpy param, we don't need to do a bindability check to see if there's matching named params since it accepts 'em all anyway. This lets us cache many multi-method dispatches again now methods get their *%_, winning back some performance. --- src/pmc/perl6multisub.pmc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pmc/perl6multisub.pmc b/src/pmc/perl6multisub.pmc index 68a633d83d3..1a36c1c7c65 100644 --- a/src/pmc/perl6multisub.pmc +++ b/src/pmc/perl6multisub.pmc @@ -381,10 +381,12 @@ static candidate_info** sort_candidates(PARROT_INTERP, PMC *candidates, PMC **pr CONST_STRING(interp, "multi_invocant")); PMC * const named = VTABLE_get_pmc_keyed_str(interp, param, CONST_STRING(interp, "named")); + PMC * const slurpy = VTABLE_get_pmc_keyed_str(interp, param, + CONST_STRING(interp, "slurpy")); - /* If it's named, don't need its type info but we will need a bindability - * check during the dispatch for it. */ - if (!PMC_IS_NULL(named)) { + /* If it's named, and not slurpy, don't need its type info but we will + * need a bindability check during the dispatch for it. */ + if (!PMC_IS_NULL(named) && PMC_IS_NULL(slurpy)) { info->bind_check = 1; continue; }