RFR: 8266822: Rename MetaspaceShared::is_old_class to has_old_class_version [v4]

Ioi Lam iklam at openjdk.java.net
Tue May 11 21:05:09 UTC 2021


On Tue, 11 May 2021 20:42:17 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:

>> Please review this simple patch for renaming the function from `MetaspaceShared::is_old_class` to `MetaspaceShared::has_old_class_version`. Also added some comment to the function.
>> 
>> Tests:
>> - [x] tier1, 2
>
> Calvin Cheung has updated the pull request incrementally with one additional commit since the last revision:
> 
>   move the has_old_class_version function to InstanceKlass

Changes requested by iklam (Reviewer).

src/hotspot/share/oops/instanceKlass.cpp line 2583:

> 2581:     return true;
> 2582:   }
> 2583:   if (has_old_class_version(ik->java_super())) {

I think it's better to change this static method into an instance method, so you can call `klass->has_old_class_version()`. You'd also need to change the above "if" to


if (ik->java_super() != NULL && ik->super->has_old_class_version()) {

-------------

PR: https://git.openjdk.java.net/jdk/pull/3983


More information about the hotspot-runtime-dev mailing list