JEP 309 (Dynamic Class-File Constants) integration into build 21?
Remi Forax
forax at univ-mlv.fr
Sun Jul 8 11:11:33 UTC 2018
Hi Ess,
----- Mail original -----
> De: "Ess Kay" <s.2016.kay at gmail.com>
> À: "compiler-dev" <compiler-dev at openjdk.java.net>
> Envoyé: Dimanche 8 Juillet 2018 07:41:27
> Objet: JEP 309 (Dynamic Class-File Constants) integration into build 21?
> Has JEP 309 been integrated into build 21 (2018/7/5)? I am unable to
> get javac to generate a CONSTANT_Dynamic entry.
the VM recognizes CONSTANT_Dynamic but there is no feature of Java the language that uses CONSTANT_Dynamic yet,
it's like when Java 7 VM has the support of invokedynamic but Java using it only in 8 for creating lambdas.
There are several features that may use CONSTANT_Dynamic, the JEP 303, constant lambdas creation, switch (expression switch or plain old switch on String and Enums), but none of them are currently integrated with the JDK.
>
> If JEP 309 has not yet been integrated any idea when it will appear in
> the JDK 11 build? Need to be able to generate our own more complicate
> test cases prior to general availability.
You can test using ASM [1] (6.2 and up) or if you are adventurous you can use cplisp [2] which is a lisp that can compile its expression into CONSTANT_Dynamics.
Rémi
[1] https://asm.ow2.io/
[2] https://github.com/forax/cplisp
More information about the compiler-dev
mailing list