RFR: 8160404: RelocationHolder constructors have bugs [v2]

John R Rose jrose at openjdk.org
Sat Dec 17 18:15:55 UTC 2022


On Thu, 15 Dec 2022 12:33:21 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

>> Kim Barrett has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   blank lines in include blocks
>
> src/hotspot/share/code/relocInfo.hpp line 892:
> 
>> 890: inline RelocationHolder::RelocationHolder() :
>> 891:   RelocationHolder(Construct(), [&] (void* p) { return ::new (p) Relocation(); })
>> 892: {}
> 
> And this would become
> Suggestion:
> 
> inline RelocationHolder::RelocationHolder() : RelocationHolder(Construct<Relocation>())
> {}

Nice suggestion.  That makes the whole pattern a little more palatable, since it puts the magic new in one place instead of N places.

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

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


More information about the hotspot-compiler-dev mailing list