If, as seems likely, exception bookkeeping is moved to a separate
stack in the interpreter (with or without dynamic-wind actions), then
C<bsr>/C<ret> addresses can stay in the Parrot_Context, and all of
pdd23_exceptions.pod that is quoted below ceases to be problematic.
Does that seem reasonable?

                                        -- Bob

------------------------------------------------------------------------
=head2 Consequenses

Exceptions are designed to work with the Parrot calling conventions.
Since the return addresses of C<bsr> subroutine calls and exception
handlers are both pushed onto the control stack, it's generally a bad
idea to combine the two.

{{ TODO: If this continues to be true, then we need a way to turn off
all exceptions. A number of built-in opcodes throw exceptions. If there
is no way to prevent this, then it is never safe to use the control
stack for anything other than exceptions. Alternatively, we leave the
control stack safe for more primitive control flow, and pick another
strategy for exceptions. }}

Reply via email to