From: | nr@labrador.eecs.harvard.edu (Norman Ramsey) |
Newsgroups: | comp.compilers |
Date: | 25 Apr 2000 02:23:31 -0400 |
Organization: | Harvard University |
References: | 00-04-125 00-04-128 00-04-134 00-04-141 |
Keywords: | Java, C |
Jonathan Barker <jandk@easynet.co.uk> wrote:
>Exceptions have to be implemented somehow, don't they? The Java
>language specification tells us the syntax and semantics of
>exceptions, but it doesn't tell us how that translates into native
>object code.
>
>[describes one implementation]
Actually it is quite possible to implement exceptions such that they
are raised in constant time, just by setting the program counter and
stack pointer. See
http://www.eecs.harvard.edu/nr/pubs/c--exn-abstract.html for some
information about how to do this. Also David Chase's two papers
(cited in the bibliography) from the Journal of C Language Translation
are excellent.
--
Norman Ramsey
http://www.eecs.harvard.edu/~nr
Return to the
comp.compilers page.
Search the
comp.compilers archives again.