This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Re: inlining methods
- To: Jeff Sturm <jsturm at sigma6 dot com>
- Subject: Re: inlining methods
- From: Matt Welsh <mdw at cs dot berkeley dot edu>
- Date: Tue, 26 Oct 1999 15:13:37 -0700
- cc: java-discuss at sourceware dot cygnus dot com
- Reply-To: Matt Welsh <mdw at cs dot berkeley dot edu>
As far as I can tell, GCJ isn't inlining methods at all, which is really
unfortunate. I'm rather surprised, as well, since it should be possible to
do this!
This summer I implemented method inlining inside of a JIT compiler at
Fujitsu Labs in Japan. It is rather straightforward and if someone would
like help on how to do this inside of GCJ I am happy to provide information
on the major issues.
Simply put, "static", "final", and "private" methods can all be inlined
since there is no chance they will be overloaded. Virtual method inlining
can be done as well, but requires either a test for the "correct" method
dispatch or more complex techniques which allow you to directly inline
without a runtime test (for example, in certain methods where only a
particular target type is possible).
I can provide references to some papers about method inlining in Java
if anyone is interested.
Matt Welsh