On Sun, 22 Mar 2026 05:10:10 GMT, Kirill Shirokov <[email protected]> wrote:
> Just a straightforward implementation of the requested change. > > Tested using tier1 tests on linux-x64, macosx-aarch64, windows-x64. My understanding is that `InstanceKlass::has_nestmate_access_to` is there because VM has to perform permission checks in some scenarios where it cannot query Java code. Ideally such permission checks should happen in one place, and I believe somewhere in the Java code (more maintainable, JIT optimizable) is the best place. If `Class.isNestmateOf` is too slow due to `Class.getNestHost`, I think we should add library_call recognition to inline it like getSuperclass. It shouldn't be hard with such a precedent. ------------- PR Comment: https://git.openjdk.org/jdk/pull/30358#issuecomment-4107466208
