java vs ia64 abi exceptions

Richard Henderson rth@redhat.com
Wed Mar 21 17:42:00 GMT 2001


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~


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /