question about arithmetic exceptions

Godmar Back gback@cs.utah.edu
Mon Nov 29 08:36:00 GMT 1999


Let me add a meta-comment to my comment regarding how I think
libgcc should be structured:

I think that gcc's premise to be able (and apparently being forced to) to 
share a single run-time library among all languages might be flawed.  Not 
only does it require you to resort to hacks such as the one for 
divisions, but it also prevents you from doing other optimizations
in my opinion.

For instance, I am convinced that the exception delivery path in Java
could be sped up substantially if exceptions didn't have to be delivered
out-of-band via thread-specific data.  Also, the unlocking of objects 
locked by synchronized methods could be faster if the compiler didn't have 
to wrap every synchronized method in a try/finally { mon_exit } wrapper.
(Possibly.)  Third, if languages could override/customize libgcc, gij 
didn't have to resort to the gnu.gcj.runtime.MethodInvocation hack --- you 
could just handle the delivery of exceptions back to the interpreter 
specially.

	- Godmar



More information about the Java mailing list