Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

invoke_catchhandler: tweak call chain after the invoke call, so that …

…the recursion_limit is set correctly

Also added myself to CREDITS ;)
  • Loading branch information...
commit bd2f8dfa4c61e75cdab780fafe81943073e068dc 1 parent 2154ebb
@mlschroe mlschroe authored
Showing with 14 additions and 10 deletions.
  1. +5 −0 CREDITS
  2. +9 −10 src/ops/perl6.ops
View
5 CREDITS
@@ -274,6 +274,11 @@ N: Matt Diephouse
U: mdiep
E: matt@diephouse.com
+N: Michael Schroeder
+U: mls
+D: Exception handling
+E: mls@suse.de
+
N: Moritz Lenz
E: moritz@faui2k3.org
U: moritz
View
19 src/ops/perl6.ops
@@ -1417,19 +1417,18 @@ inline op perl6_invoke_catchhandler(invar PMC, in PMC) :flow {
/* now the tricky part, restore exception context */
GETATTR_Exception_thrower(interp, $2, ectx);
if (PMC_IS_NULL(ectx))
- ectx = ctx;
- if (ectx != ctx)
- Parrot_pcc_set_context(interp, ectx);
- if (PMC_IS_NULL(p)) {
- /* no function provided, return immediately */
- Parrot_pcc_set_context(interp, ctx);
- goto NEXT();
- } else {
+ ectx = ctx;
+ if (!PMC_IS_NULL(p)) {
interp->current_cont = cont;
- Parrot_pcc_set_signature(interp, ectx, call_obj);
+ Parrot_pcc_set_signature(interp, ctx, call_obj);
dest = VTABLE_invoke(interp, p, dest);
- goto ADDRESS(dest);
+ if (ectx != ctx) {
+ PMC * nctx = CURRENT_CONTEXT(interp);
+ Parrot_pcc_set_caller_ctx(interp, nctx, ectx);
+ Parrot_pcc_set_signature(interp, ectx, call_obj);
+ }
}
+ goto ADDRESS(dest);
}
Please sign in to comment.
Something went wrong with that request. Please try again.