RFR: 8357987: [JVMCI] Add Support for Retrieving All Non-Static Methods of a ResolvedJavaType.
Doug Simon
dnsimon at openjdk.org
Fri May 30 15:06:09 UTC 2025
On Wed, 28 May 2025 17:41:15 GMT, Doug Simon <dnsimon 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.
>
> src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java line 583:
>
>> 581: @Override
>> 582: public boolean isDeclared() {
>> 583: if (isConstructor() || isStatic()) {
>
> `isStatic()` -> `isClassInitializer()`
Looks like you did not yet make the `isClassInitializer()` fix. This also implies some missing test coverage in TestResolvedJavaType. Can you please address both these issues.
> src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/meta/ResolvedJavaMethod.java line 118:
>
>> 116:
>> 117: /**
>> 118: * Returns {@code true} if this method would be contained in the array returned by
>
> `would be` -> `is`
not yet fixed (or pushed?)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25498#discussion_r2113583058
PR Review Comment: https://git.openjdk.org/jdk/pull/25498#discussion_r2113587598
More information about the graal-dev
mailing list