RFR: 8264731: Introduce InstanceKlass::method_at_itable_or_null() [v2]
Vladimir Ivanov
vlivanov at openjdk.java.net
Tue Apr 6 13:01:57 UTC 2021
On Tue, 6 Apr 2021 02:52:50 GMT, David Holmes <dholmes at openjdk.org> wrote:
> I assume more callers of the new API are in the pipeline?
Yes, the plan is to use it in CHA (`dependencies.cpp/hpp`). I decided to integrate runtime-related code changes separately.
> src/hotspot/share/oops/instanceKlass.cpp line 3154:
>
>> 3152:
>> 3153: Method* InstanceKlass::method_at_itable(InstanceKlass* holder, int index, TRAPS) {
>> 3154: bool itable_entry_found; // out parameter
>
> I was very confused about the logic in this code until I realized that itable_entry_found is actually an indicator as to whether or not the current class implements the interface represented by holder, and not an indicator of whether or not a method was found. It would be much clearer to me if this variable were renamed something like implements_interface.
Agree. Fixed.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3344
More information about the hotspot-runtime-dev
mailing list