Skip to content
Permalink
Browse files

Add an `is raw` onto the THROW helper

It's always called from within another control exception sub, which can
do the correct thing with the return value. Avoids some decont logic on
each use of `THROW`; given control exceptions don't really return in the
common case, this will only really help much with things like `take`,
although it does make the code smaller, and - thanks to `THROW` being a
juicy inline target - will make everything it's inlined into smaller
too.
  • Loading branch information...
jnthn committed Jan 17, 2019
1 parent bb36f04 commit 5d7079774285c48acd55df215ed15ab07a4a5515
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/control.pm6
@@ -6,7 +6,7 @@ my class PseudoStash { ... }
my class Label { ... }
class CompUnit::DependencySpecification { ... }

sub THROW(int $type, Mu \arg) {
sub THROW(int $type, Mu \arg) is raw {
my Mu $ex := nqp::newexception();
nqp::setpayload($ex, arg);
nqp::setextype($ex, $type);

0 comments on commit 5d70797

Please sign in to comment.
You can’t perform that action at this time.