RFR: 8356390: Rename ResolvedIndyEntry::set_flags to set_has_appendix [v2]

Johan Sjölen jsjolen at openjdk.org
Fri May 9 12:13:52 UTC 2025


On Fri, 9 May 2025 05:43:19 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Johan Sjölen has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Just do the obvious thing
>
> src/hotspot/share/oops/resolvedIndyEntry.hpp line 120:
> 
>> 118:     u1 old_flags = _flags &  ~(1 << has_appendix_shift);
>> 119:     // Preserve the unaffected bits
>> 120:     _flags = old_flags | new_flags;
> 
> I may be having a mental blank this late in the week, but why do we need to do anything other than:
> 
> _flags |= new_flags;
> 
> ? `new_flags` should at most have one bit set (the appendix bit) and OR'ing with zero preserves all other bits.

Oooh nah, I just realised. @dholmes-ora , we must have John's version because if we're setting it to `0` and the `_flags` already is `1` then it won't do anything.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25092#discussion_r2081539665


More information about the hotspot-dev mailing list