Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
If one POST fails, don't run any more. The spectest for this still fa…
…ils as it expects POST to run in declaration order, not reverse order.
  • Loading branch information
jnthn committed Mar 18, 2012
1 parent 8f4a063 commit 1968b89
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ops/perl6.ops
Expand Up @@ -133,6 +133,7 @@ static PMC *run_leave_phasers(PARROT_INTERP, PMC *ctx, PMC *perl6_code, PMC *res
}

if (!PMC_IS_NULL(post_phasers)) {
INTVAL failed_a_post = 0;
n = VTABLE_elements(interp, post_phasers);
for (i = 0; i < n; i++) {
int runloop_id = interp->current_runloop_id;
Expand All @@ -144,12 +145,15 @@ static PMC *run_leave_phasers(PARROT_INTERP, PMC *ctx, PMC *perl6_code, PMC *res
/* grrrrrrr */
while (interp->current_runloop && interp->current_runloop_id != runloop_id)
free_runloop_jump_point(interp);
failed_a_post = 1;
} else {
PMC *phaser = VTABLE_get_pmc_keyed_int(interp, post_phasers, i);
Parrot_ex_add_c_handler(interp, &jump_point);
Parrot_pcc_invoke_sub_from_c_args(interp, phaser, "P->", result);
}
Parrot_cx_delete_handler_local(interp);
if (failed_a_post)
break;
}
}

Expand Down

0 comments on commit 1968b89

Please sign in to comment.