Skip to content

Commit

Permalink
Optimize away a few explicit returns
Browse files Browse the repository at this point in the history
  • Loading branch information
niner committed Feb 20, 2022
1 parent fd6a3f6 commit eeeab59
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Inline/Perl5.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -895,22 +895,22 @@ class Perl6Callbacks {
Nil
}
method run($code) {
return EVAL $code;
CONTROL {
when CX::Warn {
note $_.gist;
$_.resume;
}
}
EVAL $code
}
method call(Str $name, @args) {
return &::($name)(|@args);
CONTROL {
when CX::Warn {
note $_.gist;
$_.resume;
}
}
&::($name)(|@args)
}
method invoke(Str $package, Str $name, @args) {
my %named = classify {$_.WHAT =:= Pair}, @args;
Expand All @@ -922,16 +922,16 @@ class Perl6Callbacks {
fail "No such symbol '$package'" unless $!p5.module-loaded($package);
$class := $!p5.loaded-module($package);
}
return $class."$name"(|%named<False>, |%(%named<True>));
CONTROL {
when CX::Warn {
note $_.gist;
$_.resume;
}
}
$class."$name"(|%named<False>, |%(%named<True>))
}
method create_pair(Any $key, Mu $value) {
return $key => $value;
$key => $value;
}
}

Expand Down

0 comments on commit eeeab59

Please sign in to comment.