Will Coleda <[EMAIL PROTECTED]> wrote:
> Ok. if I change that line, the program no longer infinite loops.

> However, argv is still trounced.

Ah sorry, I did miss that in your first post. First, exceptions are
really very experimental, especially when they resume. Anyway, the
PerlArray (in P5) is destroyed by calling the exception handler. it has
to be restored like so:

.sub __default_handler
   P2 = P5["_invoke_cc"]
   P5 = P5["_P5"]
   invoke P2
.end

You migh also use P4 instead of P2 or code will break, if you start
using objects.

There is still an issue with above handler - the sub entry code saves
the return continuation into P16 - the handler is treated as a normal
sub. Here is a better version:

emit
__default_handler:
   set P4, P5["_invoke_cc"]
   set P5, P5["_P5"]
   invoke P4
.eom

leo

Reply via email to