On Mon, 1 Dec 2025 23:41:04 GMT, Chen Liang <[email protected]> wrote:
>> Since access descriptor is created for each VH operation site, we can
>> optimistically cache the adapted method handle in a site if the site
>> operates on a constant VH. Used a C2 IR test to verify such a setup through
>> an inexact VarHandle invocation can be constant folded through (previously,
>> it was blocked by `asType`)
>
> Chen Liang has updated the pull request incrementally with one additional
> commit since the last revision:
>
> Tweak VH usage in some classes
src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java line 632:
> 630: @Hidden
> 631: @jdk.internal.vm.annotation.IntrinsicCandidate
> 632: static int isCompileConstant(Object obj) {
nit: an "is"-question tends to indicate a yes/no answer, but in this case it is
more of a compileConstantStatus.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28585#discussion_r2580489368