RFR: 8345580: Remove const from Node::_idx which is modified [v2]
Yagmur Eren
duke at openjdk.org
Wed Jan 8 14:12:36 UTC 2025
On Wed, 8 Jan 2025 13:57:39 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:
>> Yagmur Eren has updated the pull request incrementally with one additional commit since the last revision:
>>
>> remove casting trick in set_idx
>
> The original intent is to avoid mistaken modification of the field, so I think it may be beneficial to change all accesses to a getter and limit the accessibility of the setter using friend. It should be done as a separate patch, I'm quite scared of the aggressiveness of the C++ compiler and not sure we always compile correctly.
@merykitty thanks for the review!
> Please file a Follow-up RFE. Make Node::_idx private, and replace all uses with an accessor.
@eme64, sounds like a good idea. I'll file an enhancement.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22646#issuecomment-2577766517
More information about the hotspot-compiler-dev
mailing list