RFR: 8160821: VarHandle accesses are penalized when argument conversion is required [v3]
Chen Liang
liach at openjdk.org
Wed Dec 3 14:11:22 UTC 2025
On Wed, 3 Dec 2025 10:31:07 GMT, Per Minborg <pminborg at openjdk.org> wrote:
>> MethodHandle is immutable and can be safely published. So this is ok.
>
> I meant that even though objects are immutable, plain semantics might not always do.
>
> Reference: https://shipilev.net/blog/2014/safe-public-construction/
MethodHandle is safe. All fields in Method Handle hierarchies are either lazy/stable or final. You can refer to the `invokers` field in `MethodType`, and the `MethodHandle` array in `Invokers` for precedents.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28585#discussion_r2585263336
More information about the hotspot-compiler-dev
mailing list