FAQ Update
Jeff Sturm
jsturm@sigma6.com
Thu Nov 4 06:42:00 GMT 1999
Bryce McKinlay wrote:
>> Jeff Sturm wrote:
>> > I'm working with the CVS trunk for now, with various patches applied... I
> > can compile libgcj with -O2, almost (jc1 dumps core on MessageFormat.java
> > and Vector.java).
>> I get this too. Perhaps you could file a PR?
I assumed it was an optimizer bug, or something not specific to gcj...
> Also, there is a possible nasty
> CNI problem - when attempting to build libgcj with -O2, the linker gets a bunch of
> messages like:
>> .libs/libgcj.so: undefined reference to
> `java::net::InetAddress::checkConnect(java::lang::String *)'
>> private static methods are being optimized away or inlined by the compiler, and thus
> unable to be called from within the classes own native counterpart!
Are you using Alexandre's DECL_INLINE patches? I saw this too... I
worked around it by marking a few particular methods `final' instead of
`private'... they are still inlined but not optimized away.
I presume the c++ compiler takes similar liberties with private methods.
I'm unconvinced this is a terrible thing, though it does break some
native code. There are funny side effects of the whole Java/C++
dichotomy created by CNI, among them that jc1 can't inline native code
and vice-versa. The two languages are handled by separate compilers and
they can't always tell what the other is doing... they are connected by
a vtable, period.
--
Jeff Sturm
jsturm@sigma6.com
More information about the Java
mailing list