On Fri, Dec 12, 2008 at 4:01 PM, blindfold <[email protected]> wrote: >> What I mean is that I would be surprised to find many implementations >> of java.lang.Compiler.compileClass() that didn't look like this: >> >> public boolean compileClass(Class c) { return false; } >> >> including in systems that actually do perform JIT compilation. > > Are you talking about implementations of the javac compiler or > implementations of the java VM (JVM)?
I mean implementations of the core library. You can find the Dalvik one in the source under </dalvik/libcore/luni-kernel/>. > For Android it does not matter > what the existing JVMs do with the call, because Android has its own > VM. [...] I think that Android has full control over what > compileClass() returns Yes, we control compileClass() for Android, but it still *does* matter, because the Android effort in this area is overwhelmingly to implement a familiar class library. Since the prevailing common implementation leaves this method effectively unimplemented, we don't have a compelling reason to implement it ourselves, *especially* because implementing it would represent a significant amount of work for no real benefit, again, because our likely JIT implementation couldn't possibly be exercised well by using this class. The IBM article from 2002 that you cite in a followup talks about using it to "prove that the JIT doesn't take any internal errors." Given that the operation of this method in our case would be *very* different than the usual way the JIT runs, you wouldn't actually be able to "prove" such things in the case of Dalvik, and this would also be true of almost every newer JIT out there. The Compiler class is a vestige of the early days of JIT thought, relatively speaking, and I honestly don't know why the it hasn't been marked officially deprecated, given that that is effectively its status. -dan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
