class initialization check overhead

Tom Tromey
Mon Nov 25 21:58:00 GMT 2002

>>>>> "Adam" == Adam Megacz <> writes:

Adam> Could _Jv_InitClass be re-jiggered to perform all the register
Adam> saves itself (rather than asking the caller to do it)?  In other
Adam> words, put a PUSHALL at the beginning and a POPALL at the end?

Is this the `fastcall' convention?  We could do that on x86 machines.
You could see whether it helps pretty easily.

Adam> Or perhaps give gcj a list of classes that you know will be
Adam> referenced eventually, and have it run those <clinit>s
Adam> immediately upon startup.

As Kresten points out, this is tricky territory.  The language
specification has a lot to say on this issue.  Getting it
correct-but-slow has been difficult (I think we still have lurking


More information about the Java mailing list