home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / arch / 10563 < prev    next >
Encoding:
Internet Message Format  |  1992-11-09  |  1.8 KB

  1. Xref: sparky comp.arch:10563 comp.lang.misc:3558
  2. 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
  3. From: nickh@CS.CMU.EDU (Nick Haines)
  4. Newsgroups: comp.arch,comp.lang.misc
  5. Subject: Re: CLU break and continue (Was: Re: A challenge to the anti-goto)
  6. Message-ID: <BxGt16.Bwt.1@cs.cmu.edu>
  7. Date: 9 Nov 92 20:03:05 GMT
  8. Article-I.D.: cs.BxGt16.Bwt.1
  9. References: <721054332.26680@minster.york.ac.uk>
  10.     <1992Nov9.114323.22688@rdg.dec.com>
  11.     <BRADLEY.92Nov9101822@marley.think.com> <BxGID2.8n9@exnet.co.uk>
  12. Sender: news@cs.cmu.edu (Usenet News System)
  13. Organization: School of Computer Science, Carnegie Mellon University
  14. Lines: 18
  15. In-Reply-To: dhd@exnet.co.uk's message of 9 Nov 92 16:12:37 GMT
  16. Originator: nickh@VOILA.VENARI.CS.CMU.EDU
  17. Nntp-Posting-Host: voila.venari.cs.cmu.edu
  18.  
  19. In article <BxGID2.8n9@exnet.co.uk> dhd@exnet.co.uk (Damon) writes:
  20.  
  21.    I think the New Jersey implementation of ML also only takes a few
  22.    instructions to get to an exception handler from the raising of the
  23.    exception.  I'm no expert on how NJML is implemented, so maybe someone
  24.    out there could explain how ML does it...
  25.  
  26. Simple, you just keep a pointer to the current exception handler lying
  27. around somewhere (in a register, in the nil vector, on the stack). An
  28. alternative is to make handler frames on the stack, and have
  29. `exception pre-handler' code that trogs up the stack looking for it.
  30. The sensible thing to do seems to be a combination of these things.
  31.  
  32. In the case of SML/NJ, there isn't a stack, so a register holds the
  33. current handler (which is a continuation). In SML/NJ 0.80 on the MIPS,
  34. for instance, the register is $30.
  35.  
  36. Nick Haines nickh@cmu.edu
  37.