RFR: 8265480: add basic JVMCI support for JEP 309: Dynamic Class-File Constants [v3]
dnsimon at openjdk.java.net
Thu Apr 22 10:37:20 UTC 2021
On Wed, 21 Apr 2021 22:19:21 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:
> I am not an expert in HS/JVMCI code, but i can mostly follow it. Test looks good. I did wonder if there should be a test for a BSM with a ref type of say `List` rather than `String` given the latter can be represented directly in the constant pool (i don't know if that would exercise different code paths).
I don't think it exercises different code paths but I added it anyway.
> Why does a dynamic constant producing a primitive value need to be explicitly processed by `resolvePossiblyCachedConstantInPool`? Is that so specific certain primitive values can be identified and/or values normalized in some manner.
It's there to convert standard boxes (e.g. `java.lang.Integer`) to JVMCI boxes (e.g. `jdk.vm.ci.meta.PrimitiveConstant`)
More information about the hotspot-compiler-dev