RFR: 8306851: Move Method access flags [v2]

Coleen Phillimore coleenp at openjdk.org
Thu Apr 27 13:00:23 UTC 2023


On Thu, 27 Apr 2023 04:35:10 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Add is prefixes and some cleanups.
>
> src/hotspot/share/oops/constMethodFlags.hpp line 53:
> 
>> 51:    flag(has_type_annotations      , 1 << 9) \
>> 52:    flag(has_default_annotations   , 1 << 10) \
>> 53:    flag(caller_sensitive          , 1 << 11) \
> 
> Nit: we should consistently use either `x` or `is_x` for `x` in `overpass, caller_sensitive, hidden, scoped, ...`

That's my preference too, but I was trying to not change all the callers to is_caller_sensitive, for example, or providing a set of wrappers to change the "x" calls to "is_x" calls to the flags interface.

> src/hotspot/share/oops/method.hpp line 808:
> 
>> 806: 
>> 807:   bool is_hidden() const { return constMethod()->is_hidden(); }
>> 808:   void set_hidden() { constMethod()->set_is_hidden(); }
> 
> The naming is inconsistent here regarding `is` - either both should have it or neither IMO.

This one is easy to fix because there aren't calls everywhere.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13654#discussion_r1179054655
PR Review Comment: https://git.openjdk.org/jdk/pull/13654#discussion_r1179057923


More information about the serviceability-dev mailing list