More fun to play with.

This is t/op/hacks_5.pasm:
    newsub P0, .Exception_Handler, _handler
    set_eh P0
    div I10, 0
    print "not reached\n"
    end
_handler:
.include "signal.pasm"
    print "catched it\n"
    set I0, P5["_type"]
    neg I0, I0
    ne I0, .SIGFPE, nok
    print "ok\n"
nok:
    end

IŽknow, that signals will end up in events sometimes, but for now its a funny hack.

I still have some questions:
- We seem to need a global (the_exception) with the C<jmp_buf> inside.
What about multiple interpreters?
- When will we check, it there are events in the event queue?
- And of course finally: Is the exception handling, as now in CVS ok?
If yes, cleanup and more platforms should follow. As well as classifying exception types and switching internal_exception to real ones.


Have fun,
leo



Reply via email to