Any bytecode containing CONSTANT_Dynamic?
Remi Forax
forax at univ-mlv.fr
Fri Jun 8 10:39:29 UTC 2018
> De: "Ess Kay" <s.2016.kay at gmail.com>
> À: "compiler-dev" <compiler-dev at openjdk.java.net>
> Envoyé: Vendredi 8 Juin 2018 02:13:10
> Objet: Any bytecode containing CONSTANT_Dynamic?
> We are needing to test our applications ability to correctly handle the new
> CONSTANT_Dynamic constant pool entry. Is there any Java source code available
> anywhere that would result in the Java 11 javac generating bytecode containing
> CONSTANT_Dynamic pool entries?
Constant lambdas are translated into constant dynamic at least by the javac of Amber, but i do not know if the javac of the jdk11 does that too.
Otherwise, if you look for classes containing constant dynamic, we use this class [1] that was generated using the javac of Amber when testing ASM.
If you want a more complex example, you can play with cplisp which encode lisp atoms into the constant pool using constant dynamic [2].
regards,
Rémi
[1] https://gitlab.ow2.org/asm/asm/blob/master/asm-test/src/main/resources/jdk11/LambdaCondy.class
[2] https://github.com/forax/cplisp/blob/master/.travis.yml
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20180608/14ead1a2/attachment-0001.html>
More information about the compiler-dev
mailing list