Leopold Toetsch <[EMAIL PROTECTED]> writes: > Dan Sugalski <[EMAIL PROTECTED]> wrote: >> Exception handlers really strike me as anonymous lexically scoped >> subroutines that get called with just one parameter--the exception >> object. As far as the engine should be concerned, when an exception >> is taken we just take a continuation with the address being the start >> of the code that handles the exception. > > Reading through pdd06 the following is not really speced (IMHO): > > Exception handlers are dynamically scoped, and any > exception handler set in a scope will be removed when that > scope is exited. > > How do we remove exception handlers on scope exit. Is this done, when we > encounter a C<pop_pad> instruction? Or should the HL emit a C<clear_eh> > opcode? > As the exception handlers live on the control stack, there is not much > connection between a lexical pad being popped off and removing > exceptiion handlers in scope.
What does a lexical pad have to do with dynamic scoping? I thought that the control stack was where dynamically scoped information lived... -- Piers