This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Libjava failures status
- From: Tom Tromey <tromey at redhat dot com>
- To: Chris Lattner <sabre at nondot dot org>
- Cc: <gcc at gnu dot org>
- Date: 12 Mar 2002 17:12:46 -0700
- Subject: Re: Libjava failures status
- References: <Pine.LNX.4.30.0203121438260.27611-100000@nondot.org>
- Reply-to: tromey at redhat dot com
>>>>> "Chris" == Chris Lattner <sabre@nondot.org> writes:
>> Every _reachable_? Insane, I'm sure Sun specified this to make really
>> sure, that no highly optimizing compiler for java is implementable :/
Chris> No, it would be perfectly reasonable to represent this (safely)
Chris> with explicit checks, which would not break any
Chris> optimizations... Why does GCC have the notion of a trapping and
Chris> nontrapping instruction? Perhaps it is not the best approach
Chris> for GCJ?
gcj has a flag which will cause it to generate explicit checks.
However, if you assume that the checks usually pass, and you care more
about the performance of the normal case, and not so much about the
performance of generating the exception, and your platform has support
for it, then it is better to omit the tests and let the trap be
converted into an exception by the runtime.
For instance, this is the case on Linux, which is an import platform.
Rather than generating lots of null pointer checks, we just let the OS
generate a SEGV which we turn into a NullPointerException.
Tom