Dan Sugalski <[EMAIL PROTECTED]> writes:

> Okay, now that we're well on our way to getting sub/method/whatever
> calling down and working, I want to point us towards what I'm thinking
> of for exceptions.
>
> 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. They need to get pushed on the
> system stack so we can walk up it at runtime when an exception is
> called looking for handlers.

So, we grab another register for 'current exception continuation'?
Then when code throws an exception it just takes the exception
continuation and if that can't handle the exception it takes *its*
current exception continuation and so on up the exception chain?

Nice trick.

-- 
Piers

Reply via email to