RFR: 8299191: Unnecessarily global friend functions for relocInfo

Christian Hagedorn chagedorn at openjdk.org
Wed Dec 21 11:35:51 UTC 2022


On Wed, 21 Dec 2022 10:17:12 GMT, Kim Barrett <kbarrett 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

Looks good!

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?

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

Marked as reviewed by chagedorn (Reviewer).

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


More information about the hotspot-compiler-dev mailing list