RFR: 8357987: [JVMCI] Add support for retrieving all methods of a ResolvedJavaType [v2]
Yudi Zheng
yzheng at openjdk.org
Mon Jun 2 12:11:57 UTC 2025
On Mon, 2 Jun 2025 08:15:36 GMT, Tom Shull <duke at openjdk.org> wrote:
>> Currently from ResolvedJavaType one can retrieve all declared methods, static methods, and constructors of the given type. However, internally in HotSpot there are also VM-internal methods, such as overpass methods, associated with a given type which we cannot access via the API.
>>
>> To correct this, we should add a new method which enables VM-internal methods, such as overpass methods, to be accessed.
>
> Tom Shull has updated the pull request incrementally with one additional commit since the last revision:
>
> format javadoc and update test
src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java line 1079:
> 1077: return List.of();
> 1078: }
> 1079: return Collections.unmodifiableList(Arrays.asList(instanceMethods));
`return List.of(instanceMethods);` should work. We can then replace the above with `return List.of(runtime().compilerToVm.getAllMethods(this));`
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25498#discussion_r2120952854
More information about the hotspot-compiler-dev
mailing list