Skip to content

Commit

Permalink
A routine will always need some kind of dispatcher slot, since it may…
Browse files Browse the repository at this point in the history
… be a wrapper (in fact, we probably need to generalize this to block level).
  • Loading branch information
jnthn committed Nov 26, 2011
1 parent 78cf70e commit 5f34902
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/Perl6/Actions.pm
Expand Up @@ -1407,12 +1407,9 @@ class Perl6::Actions is HLL::Actions {
my $signature := create_signature_object(@params, $block);
add_signature_binding_code($block, $signature, @params);

# If it's a multi, needs a slot that can hold an (unvivified)
# dispatcher.
if $*MULTINESS eq 'multi' {
$*ST.install_lexical_symbol($block, '$*DISPATCHER', $*ST.find_symbol(['MultiDispatcher']));
$block[0].unshift(PAST::Op.new(:pirop('perl6_take_dispatcher v')));
}
# Needs a slot that can hold a (potentially unvivified) dispatcher.
$*ST.install_lexical_symbol($block, '$*DISPATCHER', $*ST.find_symbol(['MultiDispatcher']));
$block[0].unshift(PAST::Op.new(:pirop('perl6_take_dispatcher v')));

# Create code object.
if $<deflongname> {
Expand Down

0 comments on commit 5f34902

Please sign in to comment.