On Fri, Nov 25, 2005 at 11:45:40PM +0100, Leopold Toetsch wrote:
> Technically an excpetion is kind of an object with some info (TODO) and
> the exception handler is a (limited) continuation:
>
> pmclass Exception_Handler extends Continuation ... # see classes/
Neat.
> catch_label:
> get_results "(...)", Pexcept, Smessage, ... # whatever
Right.
> And the opcode
> push_eh catch_label
> is creating the Exception_handler with the 'get_results' in it's
> context, so that it can deliver results.
Ah, interesting! And definitely a great way to implement the current
scheme. I have some thoughts about changing the current scheme, which
I'll mention in another message. Nothing impending, though.
> Detailed syntax bits welcome ...
Let's see...
# (a)
catch_label:
.results ($P0)
Not bad. Matches up with get_results. But the direction isn't
entirely clear when you read it: Is it setting or getting results?
# (b)
catch_label:
.get_results ($P0)
Better, I think.
# (c)
catch_label:
($P0) = @EXCEPTION # or some other magic word
Ew. I still like (b).
--
Chip Salzenberg <[EMAIL PROTECTED]>