Skip to content

Commit

Permalink
When we have a named slurpy param, we don't need to do a bindability …
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
jnthn committed Jul 22, 2009
1 parent 23e8f09 commit 254b3a5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/pmc/perl6multisub.pmc
Expand Up @@ -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;
}
Expand Down

0 comments on commit 254b3a5

Please sign in to comment.