Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
First cut implementation of callwith. Probably not perfect, but essen…
…tially works.
  • Loading branch information
jnthn committed Jul 10, 2011
1 parent 3209cd1 commit 4bc1ac3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/core/NYI.pm
Expand Up @@ -3,7 +3,6 @@
sub NYI(*@msg) { die @msg };

sub callsame(|$) { NYI "callsame not yet implemented" };
sub callwith(|$) { NYI "callwith not yet implemented" };
sub nextsame(|$) { NYI "nextsame not yet implemented" };
sub nextwith(|$) { NYI "nextwith not yet implemented" };

Expand Down
6 changes: 6 additions & 0 deletions src/core/control.pm
Expand Up @@ -67,6 +67,12 @@ my &proceed := -> {
THROW(Nil, pir::const::CONTROL_CONTINUE)
}

my &callwith := -> *@pos, *%named {
my Mu $dispatcher := pir::perl6_find_dispatcher__P();
$dispatcher.exhausted ?? Nil !!
$dispatcher.call_next(|@pos, |%named)
};

sub die(*@msg) { pir::die__0P(@msg.join('')) }

sub eval(Str $code, :$lang = 'perl6') {
Expand Down

0 comments on commit 4bc1ac3

Please sign in to comment.