Android's Jack and Jill compilers head uphill to developers

Google introduces experimental compilers to Android 5.0, and swaps Dalvik for a faster runtime

With Android 5.0 Lollipop now winging its way to phones, Google has quietly made changes to Android's compiler tools as well. New for developers is a pair of compilers, code-named Jack and Jill, designed to speed up Android app creation.

Eric LaFortune, technical director of Saikoa, which creates software for optimizing and obfuscating Java and Android apps, found Jack and Jill in version 21.1 of the Android SDK Build Tools, released in October. According to LaFortune, Jack and Jill are part of "a new compiler toolchain to transform Java code into Dalvik bytecode," in part using "a new intermediate representation called Jayce."

Java source code is currently compiled for Android apps by way of two build tools: the Javac compiler, which yields Java bytecode, and the Dex tool, which converts the Java code into the Android-specific Dalvik bytecode. With Jack, both steps are combined in one, using the Java compiler provided by the Eclipse Foundation to do its work.

Jill works as a precompiler to convert class and runtime libraries into Jayce bytecode. Jack then uses that bytecode as part of its own compilation process.

In his testing, LaFortune discovered that the new compilers don't yet support the full range of options available to the current generation of Android compilers -- a sign that they're still works in progress. Jack and Jill don't support Java 8 yet, either, although LaFortune found the compilers do seem aware of 1.8-level features such as closures, but simply choose not to implement them.

Android's Java-based underpinnings are getting a major reworking. Most important, for both Google and its developers, is the switch from the Dalvik virtual machine to the Art runtime. Art provides better performance -- typically around twice what Dalvik provides -- without placing an additional burden on the developer. Another reason for the shift to Art may be to reduce dependency on Dalvik, since Google's creation of that Java-compatible VM inspired a lawsuit by Oracle that is still grinding its way through the courts.

Jack and Jill don't directly affect how Art since Art compiles Dalvik bytecode on its own into native code. That said, the optimizations carried out with Jack and Jill indicate the entirety of Android's environment, from development toolchain to runtime, is being transformed from the inside out -- although not always in plain sight.

This story, "Android's Jack and Jill compilers head uphill to developers" was originally published by InfoWorld.

Notice to our Readers
We're now using social media to take your comments and feedback. Learn more about this here.