This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: class initialization check overhead


Jeff Sturm writes:
 > On 25 Nov 2002, Tom Tromey wrote:
 > > Jeff> Come to think of it... what if compiled classes were prepared
 > > Jeff> early instead of at initialization time?  In my application of
 > > Jeff> 191 classes, only 36 have a <clinit>.  If the frontend knows
 > > Jeff> that a class invokes no <clinit> method (directly or in a
 > > Jeff> superclass), could the _Jv_InitClass be dropped entirely?
 > >
 > > Yes, with caveats.
 > >
 > > I think there are two cases to consider.
 > >
 > > First, the general case.  Once we have the full binary compatibility
 > > code in place, we won't be able to omit class initialization calls.
 > 
 > I agree.  For full binary compatibility, I'd eventually like
 > -fno-assume-compiled and -findirect-dispatch to work together.  Entire
 > packages could be compiled to native code with direct references to
 > classes in the same package, while assuming nothing about other packages.
 > 
 > I think that could yield a good compromise of optimization and
 > compatibility.

Absolutely right.  Sorry to post a "me too" message, but this is the
way I've been thinking gcj should go.

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]