Skip to content

Commit

Permalink
Reinit ExceptionHandler for reuse
Browse files Browse the repository at this point in the history
  • Loading branch information
bacek committed Jan 24, 2011
1 parent df6436f commit 0fc33b1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/ops/experimental.ops
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,11 @@ op push_cached_eh(in INT, inconst LABEL) {
VTABLE_set_pointer(interp, eh, CUR_OPCODE + $2);
VTABLE_set_pmc_keyed_int(interp, sub->eh_cache, PTR2INTVAL(CUR_OPCODE), eh);
}
else {
/* Reinit handler */
VTABLE_init(interp, eh);
VTABLE_set_pointer(interp, eh, CUR_OPCODE + $2);
}

/* Actually push ExceptionHandler */
Parrot_cx_add_handler_local(interp, eh);
Expand All @@ -381,6 +386,11 @@ op push_cached_eh(inconst LABEL) {
VTABLE_set_pointer(interp, eh, CUR_OPCODE + $1);
VTABLE_set_pmc_keyed_int(interp, sub->eh_cache, PTR2INTVAL(CUR_OPCODE), eh);
}
else {
/* Reinit handler */
VTABLE_init(interp, eh);
VTABLE_set_pointer(interp, eh, CUR_OPCODE + $1);
}

/* Actually push ExceptionHandler */
Parrot_cx_add_handler_local(interp, eh);
Expand Down

0 comments on commit 0fc33b1

Please sign in to comment.