RFR: 8366584: Add an InstanceKlass::super() method that returns InstanceKlass* [v3]
Ioi Lam
iklam at openjdk.org
Tue Sep 2 21:08:26 UTC 2025
On Tue, 2 Sep 2025 05:31:30 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
>>
>> @dholmes-ora and @coleep comments
>
> src/hotspot/share/oops/klassVtable.cpp line 1574:
>
>> 1572: Klass* super = _klass->super();
>> 1573: if (super != nullptr) {
>> 1574: InstanceKlass* sk = InstanceKlass::cast(super); // why are we sure this is InstanceKlass??
>
> I don't think it is guaranteed to be an IK. But AFAICS we don't actually need an IK here anyway, we should be able to use `super` directly.
Fixed.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27037#discussion_r2317170011
More information about the hotspot-dev
mailing list