Patch: trivial optimizations

Jeff Sturm
Sat Apr 8 17:35:00 GMT 2000

Tom Tromey wrote:
> If we made VectorEnumeration a final class, would gcj automatically
> inline the function call there?

In theory, making VectorEnumeration and/or hasMoreElements final would
be sufficient to inline the call.  But inlining never really worked in
gcj, I don't think... Alexandre submitted a patch to calls.c as a
special case for gcj, and I don't think it was accepted:

Even with this patch, gcj inlining only works in special cases.  The
inlined method must be defined before it is used, and must be in the
same source file.

There are other problems with integrate.c.  I think tree-based inlining
(ala g++) would be better for gcj.  I personally don't have the time or
expertise to make it work (I did take a crack at it).

Jeff Sturm

More information about the Java-patches mailing list