RFR: 8377446: Improve parameter naming in pointer_delta()
Albert Mingkun Yang
ayang at openjdk.org
Tue Feb 10 08:27:31 UTC 2026
On Mon, 9 Feb 2026 08:41:36 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
> Hi all,
>
> please review this renaming of arguments to `pointer_delta`, instead of `left` and `right` use `high` and `low` (address) to (imo) better indicate the expected meaning of the arguments.
>
> Testing: gha
>
> Thanks,
> Thomas
src/hotspot/share/utilities/globalDefinitions.hpp line 440:
> 438: // Calculates the difference between the given high and low addresses, asserting
> 439: // on underflow.
> 440: //
This new doc makes it harder to reason about the arg ordering, IMO. I kind of prefer the original doc.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29631#discussion_r2786489214
More information about the hotspot-dev
mailing list