On Fri, 23 Jan 2026 20:08:58 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: > > Wording update, thanks Jorn src/java.base/share/classes/java/lang/invoke/VarHandle.java line 2014: > 2012: // Exists for the adaption mechanism of AccessDescriptor > 2013: // Each VH should report its explicitly (receiver, coordinates) and > 2014: // implicitly (static declaring class) used class to > MethodHandle.isReachableFrom Perhaps add a comment: "Classes which define this abstract method should themselves be final or locally sealed, to make it possible to ensure that all relevant classes are taken into account." ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/28585#discussion_r2723365226
