4 ms·
The tool chain still supports Java bytecode via intermediate compilation to Jayce (using the Jill tool).
by seabrookmx 12y ago
The tool chain still supports Java bytecode via intermediate compilation to Jayce (using the Jill tool).
- pjmlp 12y agoGoogle is yet to support invokedynamic, which is used by Java 8 lambdas.
- lern_too_spel 12y agoWhich is used by the Hotspot JVM's Java 8 lambdas. 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.
- pjmlp 12y ago> Which is used by the Hotspot JVM's Java 8 lambdas 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.
- lern_too_spel 12y ago> Not really, because it is part of the Java 8 .class files. 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.
- pjmlp 12y ago> Dalvik VM and ART handle Dalvik bytecode generated from Java the language.... 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.