Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Look at correct frame to see if we're in a PRE.
Fixes incorrect running of POST/LEAVE when a PRE fails.
  • Loading branch information
jnthn committed Oct 6, 2015
1 parent c981530 commit 8709352
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/vm/moar/ops/perl6_ops.c
Expand Up @@ -527,8 +527,9 @@ static MVMuint8 s_p6inpre[] = {
MVM_operand_int64 | MVM_operand_write_reg
};
static void p6inpre(MVMThreadContext *tc, MVMuint8 *cur_op) {
if (tc->cur_frame->flags & RAKUDO_FRAME_PRE_FLAG) {
tc->cur_frame->flags ^= RAKUDO_FRAME_PRE_FLAG;
MVMFrame *test_frame = tc->cur_frame->caller;
if (test_frame && test_frame->flags & RAKUDO_FRAME_PRE_FLAG) {
test_frame->flags ^= RAKUDO_FRAME_PRE_FLAG;
GET_REG(tc, 0).i64 = 1;
}
else {
Expand Down

0 comments on commit 8709352

Please sign in to comment.