This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
java vs ia64 abi exceptions
- To: Andrew Haley <aph at redhat dot com>
- Subject: java vs ia64 abi exceptions
- From: Richard Henderson <rth at redhat dot com>
- Date: Wed, 21 Mar 2001 17:42:00 -0800
- Cc: java at gcc dot gnu dot org
It appears to me that Java's exception handling requirements are
(discounting the synchronous and asynchronous non-call sources)
simpler than C++. Namely:
* No nested exceptions, so no need for an exception stack.
* Garbage collected objects, so no need for the exception
object to be deleted.
* Objects always referenced by pointer, and no MI, so no
need for any pointer values to be adjusted, or copy
constructors invoked in the handler.
* No explicit destructors, so no call to terminate if a
destructor throws while processing cleanups.
* Exception specifications checked at compile time, so no
need to do anything at runtime.
Correct?
If so, the way I plan to implement the java compiler bits and
runtime is to use a use a stripped down version of the C++
personality routine with the Java type match bits substituted
appropriately.
There does not appear to be any way to do catch-all except
catch(Throwable), which isn't going to interoperate with
exceptions generated by other languages. If interoperability
were desired (apart from finally) we'd need to get either the
compiler or the runtime to call _Unwind_DeleteException when
the catch handler is complete. I don't plan on doing that
right away.
Comments?
r~