RFR: 8354954: Typed static memory for late initialization of static class members in Hotspot [v4]

Johan Sjölen jsjolen at openjdk.org
Tue Apr 22 10:35:53 UTC 2025


On Sat, 19 Apr 2025 11:24:33 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> Johan Sjölen has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Move semantics would be nice.
>
> src/hotspot/share/utilities/stableValue.hpp line 68:
> 
>> 66:   void initialize(Ts&... args) {
>> 67:     DEBUG_ONLY(_initialized = true);
>> 68:     new (ptr()) T(args...);
> 
> I think this should use perfect forwarding.  The style guide should also be updated to permit using
> perfect forwarding.

I agree, but can we do this in a separate PR then? Getting in a style guide change via this PR wouldn't be very nice.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24689#discussion_r2053836823


More information about the hotspot-dev mailing list