Skip to content

Commit a776393

Browse files
committed
[JVM] Make CONTROL block work with CONTROL_ANY
1 parent 0e5f3d0 commit a776393

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/vm/jvm/QAST/Compiler.nqp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ my $TYPE_RESUME := 'Lorg/perl6/nqp/runtime/ResumeStatus$Frame;';
7070

7171
# Exception handler categories.
7272
my $EX_CAT_CATCH := 1;
73+
my $EX_CAT_ANY := 2;
7374
my $EX_CAT_NEXT := 4;
7475
my $EX_CAT_REDO := 8;
7576
my $EX_CAT_LAST := 16;
@@ -86,7 +87,7 @@ my $EX_CAT_CONTROL := $EX_CAT_NEXT +| $EX_CAT_REDO +| $EX_CAT_LAST +|
8687
$EX_CAT_TAKE +| $EX_CAT_WARN +|
8788
$EX_CAT_SUCCEED +| $EX_CAT_PROCEED +|
8889
$EX_CAT_AWAIT +| $EX_CAT_EMIT +| $EX_CAT_DONE +|
89-
$EX_CAT_RETURN;
90+
$EX_CAT_RETURN +| $EX_CAT_ANY;
9091

9192
# Exception handler kinds.
9293
my $EX_UNWIND_SIMPLE := 0;
@@ -1612,6 +1613,7 @@ my %handler_names := nqp::hash(
16121613
'EMIT', $EX_CAT_EMIT,
16131614
'DONE', $EX_CAT_DONE,
16141615
'RETURN', $EX_CAT_RETURN,
1616+
'ANY', $EX_CAT_ANY,
16151617
);
16161618
QAST::OperationsJAST.add_core_op('handle', :!inlinable, sub ($qastcomp, $op) {
16171619
my @children := nqp::clone($op.list());

src/vm/jvm/runtime/org/perl6/nqp/runtime/ExceptionHandling.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
public class ExceptionHandling {
1313
/* Exception handler categories. */
1414
public static final int EX_CAT_CATCH = 1;
15+
public static final int EX_CAT_ANY = 2;
1516
public static final int EX_CAT_NEXT = 4;
1617
public static final int EX_CAT_REDO = 8;
1718
public static final int EX_CAT_LAST = 16;

0 commit comments

Comments
 (0)