[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: exception systems
| Cc: shivers@ai.mit.edu, will@ccs.neu.edu, rrrs-authors@mc.lcs.mit.edu,
| kmp@harlequin.com
| References: <9604181347.aa04504@mc.lcs.mit.edu>
| X-Mailer: Mew version 1.03 on Emacs 19.28.1
| Mime-Version: 1.0
| Content-Type: Text/Plain; charset=us-ascii
| Date: Thu, 18 Apr 1996 14:52:10 -0400
| From: Matthias Blume <blume@CS.Princeton.EDU>
|
| It would perhaps be a good idea to look at John Reppy's interrupt
| handling mechanism for SML/NJ. It is based on continuations. This
| way one can easily build context-switch on top of it (which is what he
| needed it for -- because he wanted to use it for CML), but it is
| almost trivial to write a signal handler that raises an exception
| should this be the desired effect.
|
| Of course, for all this to work efficiently one needs a very efficient
| implementation of call/cc.
I don't think that cwcc is necessary at all in a basic interrupt
handling feature.
In MIT Scheme, interrupts just "push a new frame". The interrupt
handler can then decide whether it wants to use cwcc or do something
else. For example, the gc interrupt handler just goes ahead and GCs
since the stack is handled specially by the core GC.
In essence I view the bottom-level of interrupt and exception handling
as a procedure call not visible in the code of the interrupted routine.
It should require no more overhead than this.