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

Kim Barrett kbarrett at openjdk.org
Tue Apr 22 15:25:46 UTC 2025


On Tue, 22 Apr 2025 10:33:02 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:

>> 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.

Personally, I'm okay with this using perfect forwarding now.

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

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


More information about the hotspot-dev mailing list