libjava status on Solaris 8/Intel and IRIX 6.5
Andrew Haley
aph@cambridge.redhat.com
Wed Mar 27 01:36:00 GMT 2002
Tom Tromey writes:
> >>>>> "Adam" == Adam Megacz <gcj@lists.megacz.com> writes:
>
> Adam> What's the advantage to using template-references instead of
> Adam> pointers? Non-conservative GC, perhaps? What else?
>
> Andrew> Inline reference checks, mostly.
>
> Adam> Can't the gcc equivalent of the JVM's 'CheckClassCast' be inlined?
>
> Andrew is really referring to null pointer checks here, not cast
> checking. The problem is if you write CNI code on MMU-less platforms,
> then you have to insert manual null pointer checks in your code. This
> is hard to maintain. So one idea is to use ref<> instead and then let
> the wrapper template do the checking on such platforms.
Actually, it's the only idea left. I submitted a patch to the C++
compiler which would let it do null pointer checking. The patch was
rejected, although I reckon it would have been useful for C++ as well.
Sigh.
I've been thinking of designing a scheme which allows us to run both
schemes in parallel. This would allow us to convert libgcj without
breaking CNI compatibility for existing users. I can also write a
program to convert sources automatically to the new form.
I hope that if I can make the pain of conversion very slight that I
will be able to persuade people to let me do it.
Andrew.
More information about the Java
mailing list