RFR: 8299191: Unnecessarily global friend functions for relocInfo

Kim Barrett kbarrett at openjdk.org
Thu Dec 22 02:32:48 UTC 2022


On Wed, 21 Dec 2022 11:31:19 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> Please review this small cleanup around the relocInfo class.  It declares a
>> couple of global functions as friends, so they have access to private
>> constructors and helper functions.  But there is no reason for these functions
>> to be at global scope.  It is more natural for them to be static factory
>> functions in relocInfo.
>> 
>> Testing:
>> mach5 tier1
>
> src/hotspot/share/code/relocInfo.cpp line 89:
> 
>> 87:   }
>> 88:   // cannot compact, so just update the count and return the limit pointer
>> 89:   (*this) = prefix_info(plen);       // write new datalen
> 
> Just a minor thing: Is there a specific reason for these additional whitespaces?

No, I've no idea where those spaces came from.  I thought maybe I'd hit `meta-;` (emacs indent for comment), but nope, that puts a different number of spaces there.  And it's not manually lined up with other comments in the function.

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

PR: https://git.openjdk.org/jdk/pull/11753


More information about the hotspot-compiler-dev mailing list