Skip to content

Commit

Permalink
Add a couple of missing CX:: classes.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Oct 31, 2016
1 parent 221633a commit 07eeea8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/core/Exception.pm
Expand Up @@ -240,6 +240,12 @@ my class CX::Proceed does X::Control {
my class CX::Return does X::Control {
method message() { "<return control exception>" }
}
my class CX::Emit does X::Control {
method message() { "<emit control exception>" }
}
my class CX::Done does X::Control {
method message() { "<done control exception>" }
}

sub EXCEPTION(|) {
my Mu $vm_ex := nqp::shift(nqp::p6argvmarray());
Expand Down Expand Up @@ -276,6 +282,12 @@ sub EXCEPTION(|) {
elsif $type == nqp::const::CONTROL_RETURN {
$ex := CX::Return.new();
}
elsif $type == nqp::const::CONTROL_EMIT {
$ex := CX::Emit.new();
}
elsif $type == nqp::const::CONTROL_DONE {
$ex := CX::Done.new();
}
#?if !moar
# for MoarVM this check is done in src/Perl6/Metamodel/BOOTSTRAP.nqp, cmp 222d16b0b9
elsif !nqp::isnull_s(nqp::getmessage($vm_ex)) &&
Expand Down

0 comments on commit 07eeea8

Please sign in to comment.