RFR: 8356390: Rename ResolvedIndyEntry::set_flags to set_has_appendix
David Holmes
dholmes at openjdk.org
Fri May 9 05:45:50 UTC 2025
On Wed, 7 May 2025 12:29:00 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:
> The `set_flags` function really only sets whether it has an appendix or not, and there's a separate `set_resolution_failed` method just below that also alters the flag. Just rename this to `set_has_appendix`
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.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25092#discussion_r2080972225
More information about the hotspot-dev
mailing list