Native wrapper compilation and LLVM 2.6

Gary Benson gbenson at
Wed Oct 28 05:19:42 PDT 2009

Michael Franz wrote:
> What is the benefit of the native methods being handled differently?
> From your blog, you said the interpreted methods are put on a queue
> to be compiled, the native methods are compiled immediately.
> Couldn't the native methods also be put on the same queue?
> I am not suggesting that LLVM < 2.6 be kept, I am just curious why
> the logic is different.

Looking at the code in HotSpot, it seems that native methods used to
be handled this way, but at some point they were separated out.  In
normal HotSpot I guess there's no reason to queue them as they're
really simple to generate.  I looked at removing the logic that
separates them -- making native methods get queued -- but once you've
created them the code to insert them into the VM differs considerably.
I'm guessing that what happened is once the generation was separated
someone came along and said, "hey, we can really optimize handling of
native methods now", and did a bunch of optimization.  It's not easy
to see how to refactor the compiler interface's insertion code to
handle both cases neatly.



More information about the distro-pkg-dev mailing list