[foreign] RFR 8224481: Optimize struct getter and field getter paths.
Maurizio Cimadamore
maurizio.cimadamore at oracle.com
Wed May 22 22:43:46 UTC 2019
Also, I believe the instance field for the lazily computed getter MH
should be marked as @Stable, which could possibly squeeze some more out
of the JIT.
Maurizio
On 22/05/2019 23:28, Maurizio Cimadamore wrote:
> So, popping back to our enhancements, I think what the patch does is
> legit. In terms of the code, I don't like how the code made OfStruct
> _not_ a Reference, and is instead using OfStruct as a holder for some
> helper functionalities, plus the cache, whereas the real reference is
> an anonymous class generated inside the computeValue() method.
>
> It seems to me that we could have Reference.OfStruct keep being a
> Reference, have a constructor that takes a Class object, and then have
> a static ClassValue field in References which, upon computeValue
> creates a new instance of Reference.OfStruct for that class. I think
> the implementation would be a lot more linear that way (unless I'm
> missing something)
More information about the panama-dev
mailing list