Constant Dynamic in ASM
Remi Forax <[email protected]> Fri, 18 Aug 2017 23:23:38 +0200 (CEST)
| Newsgroups | gmane.comp.java.objectweb.asm |
|---|---|
| Message-ID | <[email protected]> |
Hi all, as part of the Amber project [1], i've started to implement the new ConstantDynamic (condy) constant pool constant in a newly created CONDY branch [2], condy is a user programmable constant in the constant pool that is initialized with a bootstrap method (like invokedynamic). The current draft of the spec is here [3]. In term of implementation, the code that deals with INDY and CONDY Items is shared, i've changed the string cache to be an object cache so now String and Condy constant pool items are only process once (a CONDY can itself reference a CONDY, so calculating a CONDY can be expensive). Perhaps, i should also cached the Handle objects which is the other constant which is more than just a reference to a String. Because a Condy is a constant pool item, it can be decoded when processing an annotation, so out of band from the accept method so i had to migrate the boostrap method array from Context to ClassReader. This is the only field of ClassReader which is initialized after executing the constructor, i believe it's OK, but i may be wrong. Feel free to test, by pulling the amber repository [4], switch to the condy branch, and build the JDK [5] (if you have never build your own JDK, it's a good reason to start). I will implement the other features of amber/valhalla during the next two weeks using one branch by feature, at some point, all these features will be available in the ASM_7_FUTURE branch. regards, Rémi [1] http://openjdk.java.net/projects/amber/ [2] https://gitlab.ow2.org/asm/asm/tree/CONDY [3] http://cr.openjdk.java.net/~jrose/jvm/condy-jvms-2017-0620.html [4] http://hg.openjdk.java.net/amber [5] http://hg.openjdk.java.net/amber/amber/raw-file/c8ec790f0332/common/doc/building.html -- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws