about non-compatible optimization (was: Re: patch to bring java vtables closer to g++ abi conformance)

Andrew Haley aph@cambridge.redhat.com
Tue Jan 29 16:08:00 GMT 2002


Bryce McKinlay writes:
 > Per Bothner wrote:
 > 
 > > If we can't
 > > use that, we can always do have bar.foo make a plain call to
 > > bar.foo.alreadyinitialzed.  After all there are no variable-sized
 > > argument lists or structures passed by value in Java, so this is
 > > easy.  It might produce slightly confusing stack traces, but
 > > that can be fixed.
 > 
 > This could work nicely if we did static calls through our own static 
 > method tables. I don't think there is any easy portable way to update 
 > the PLT though, right?

Portable?  No.  Such optimizations are done in architecture-dependent
ways in other JVMs, and I see no reason why we shpuld not do the same.

 > It would also come at some cost in code size due to the extra symbols 
 > for every static method.

Sure, this optimization will increase code size.  But only a little
bit.

 > For now I think simply moving initialization to the caller would improve 
 > things a lot.

Perhaps, but it would complicate the business of converting to doing
it the Right Way (TM).  :-)

Andrew.



More information about the Java mailing list