RFR: 8356390: Rename ResolvedIndyEntry::set_flags to set_has_appendix [v4]
David Holmes
dholmes at openjdk.org
Mon May 12 02:05:01 UTC 2025
On Fri, 9 May 2025 12:11:11 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:
>> 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.
Hmmm so the complex machinations is not really about "preserving the other bits".
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25092#discussion_r2083709472
More information about the hotspot-dev
mailing list