RFR: 8354954: Typed static memory for late initialization of static class members in Hotspot [v7]
Johan Sjölen
jsjolen at openjdk.org
Mon Apr 28 11:46:50 UTC 2025
On Tue, 22 Apr 2025 15:56:32 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:
>>
>> Use the pointer, of course
>
> Changes requested by kbarrett (Reviewer).
@kimbarrett,
It's been 5 days and we've received no more comments. I've applied all of your comments, except the `get()` rename. To me, both `ptr` and `get` is fine. We can take the rename just to make it more obviously pronuncable.
I haven't run any testing except building on the current HEAD, so we'll wait for GHA.
We need a better name than `StableValue<T>`. We could call it `Deferred<T>`, or `DeferredInitialization<T>`. I think that `Deferred<T>` is better, it's a bit shorter while conveying *some* meaning. You can very easily jump2def to see what it says in the docs, and then probably remember it.
Regarding tooling: I use `clangd` as my LSP server, so clang provides my IDE capabilities. It has no problem with figuring out the T and using it after a `get()` or `->`.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/24689#issuecomment-2834976917
More information about the hotspot-dev
mailing list