home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.arch:10563 comp.lang.misc:3558
- Path: sparky!uunet!ferkel.ucsb.edu!taco!gatech!swrinde!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!uwm.edu!ogicse!das-news.harvard.edu!cantaloupe.srv.cs.cmu.edu!crabapple.srv.cs.cmu.edu!nickh
- From: nickh@CS.CMU.EDU (Nick Haines)
- Newsgroups: comp.arch,comp.lang.misc
- Subject: Re: CLU break and continue (Was: Re: A challenge to the anti-goto)
- Message-ID: <BxGt16.Bwt.1@cs.cmu.edu>
- Date: 9 Nov 92 20:03:05 GMT
- Article-I.D.: cs.BxGt16.Bwt.1
- References: <721054332.26680@minster.york.ac.uk>
- <1992Nov9.114323.22688@rdg.dec.com>
- <BRADLEY.92Nov9101822@marley.think.com> <BxGID2.8n9@exnet.co.uk>
- Sender: news@cs.cmu.edu (Usenet News System)
- Organization: School of Computer Science, Carnegie Mellon University
- Lines: 18
- In-Reply-To: dhd@exnet.co.uk's message of 9 Nov 92 16:12:37 GMT
- Originator: nickh@VOILA.VENARI.CS.CMU.EDU
- Nntp-Posting-Host: voila.venari.cs.cmu.edu
-
- In article <BxGID2.8n9@exnet.co.uk> dhd@exnet.co.uk (Damon) writes:
-
- I think the New Jersey implementation of ML also only takes a few
- instructions to get to an exception handler from the raising of the
- exception. I'm no expert on how NJML is implemented, so maybe someone
- out there could explain how ML does it...
-
- Simple, you just keep a pointer to the current exception handler lying
- around somewhere (in a register, in the nil vector, on the stack). An
- alternative is to make handler frames on the stack, and have
- `exception pre-handler' code that trogs up the stack looking for it.
- The sensible thing to do seems to be a combination of these things.
-
- In the case of SML/NJ, there isn't a stack, so a register holds the
- current handler (which is a continuation). In SML/NJ 0.80 on the MIPS,
- for instance, the register is $30.
-
- Nick Haines nickh@cmu.edu
-