RFR: 8377446: Improve parameter naming in pointer_delta() [v2]

Thomas Schatzl tschatzl at openjdk.org
Tue Feb 10 10:46:57 UTC 2026


On Tue, 10 Feb 2026 08:24:46 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> Thomas Schatzl has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update src/hotspot/share/adlc/adlArena.cpp
>>   
>>   Co-authored-by: Christian Hagedorn <christian.hagedorn at oracle.com>
>
> 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.

Originally there has not been any documentation. Could you elaborate what this addition of the explanation of what the method does (first sentence) and the arguments (second sentence) make worse than no documentation of the arguments?

What was better before? It did not event explain what it did, what were expectations and failure mode.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29631#discussion_r2787201450


More information about the hotspot-dev mailing list