-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Replace sun.misc.Unsafe used in LazyVals with VarHandles #24109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
a82a297
to
5aafc89
Compare
I actually wonder: is that worth it? It seems to bring additional complexity to the transformation. Sure, we need one call for every
IMO that is really worth it, but for a different reason: it removes the last reference to the (We can drop the |
It's an obvious improvement so I wanted to take it. Unfortunately, even without this we still had to introduce complexity in the MoveStatics phase (directly linking to the LazyVals phase), so we are not doing that much more (1st commit vs 2nd commit). I'll try running some benchmark tests to see if it's worth it.
Right, I hadn't even thought about that (we still reference the nested classes but now I realize that's not an issue). Weirdly, even with the objCAS2 call, the warnings disappeared for me. |
5aafc89
to
74429df
Compare
a35121d
to
9032701
Compare
9032701
to
bb1b2ca
Compare
Just a few small tweaks left (
should be done by tomorrow,I mostly want to confirm the closed community build works without running locally):