The Upcoming Jack and Jill Compilers in Android
saikoa.com
saikoa.com
This is strangely reminiscent of Apple's strong backing of LLVM.
More competition and corporate funding in the compiler scene is always a good thing.
See also:
http://stackoverflow.com/questions/3061654/what-is-the-diffe...
It's trivial to translate invokedynamic into Java 6 or Dalvik bytecode, and ART should be smart enough to recognize those translations and generate optimal native binary translations.
Not really, because it is part of the Java 8 .class files. So all certified JVMs need to make use of this information.
> It's trivial to translate invokedynamic into Java 6 or Dalvik bytecode, and ART should be smart enough to recognize those translations and generate optimal native binary translations.
Given how Android updates work and the state of Java 7 support across Android versions, I guess many of us will keep on using Java 6/C++ combo.
Dalvik VM and ART handle Dalvik bytecode generated from Java the language, which is separate from the Java virtual machine. Using the same mechanisms as the Java Virtual Machine (and its reference HotSpot implementation) is not technically required to handle features in the Java language, as GCJ, GWT, j2obj, Dalvik, and now ART have shown.
> Given how Android updates work...
Because it is trivial to transform invokedynamic into Dalvik bytecode, my suggested design will work on all existing devices. Indeed, it's possible to use lambdas on Android today (without invokedynamic) with Kotlin, Scala, and Retrolambda, for example. It's possible to further optimize handling of lambdas on future releases.
Invokedynamic is not a significant barrier to implementing lambda support on Android. Handling the class library update is, and Jayce and related tooling seems to provide a way to solve that problem. It might even help provide full support for Java 7 to older devices by putting AutoClosable implementations of classes into the APK when necessary.
Version 6, with partial support for Java 7 added in Android 4.4 tooling.
> Indeed, it's possible to use lambdas on Android today with Kotlin, Scala, and Retrolambda, for example. It's possible to further optimize handling of lambdas on future releases.
All workarounds for Google's lack of support in the official tooling.
One advantage the Jayce development seems to provide is the possibility of optimizing Dalvik bytecode output based on data that is hard to recover from Java bytecode but present in the Java source. Secondarily, there may be build time improvements, but build times aren't C++ bad.
But my best guess at why they did this is to support Java 8 on older devices. Without Proguard in the build system, they would have to include the entire Java 8 class library subset they plan to support in every build, resulting in massive distributables. By building Proguard into the base build system, they can include just the part of Java 8 that is necessary for the app. Jayce likely has some features that make the Proguard tasks easier.
I'm speculating far beyond the OP here.
Nothing, assuming Google cares to implement invokedynamic support.
It has an LLVM based backend implemented, but it is not the production one and is not used on any device.
I don't remember offhand if they have future plans for it, but at the time, it turned out to not be the best engineering option, and hasn't been touched in a while. The main compilers used are the quick one and the optimizing one.
You can see this yourself, since ART uses AOSP as it's master.
http://en.wikipedia.org/wiki/Jack_and_Jill_%28nursery_rhyme%...