-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New lazy vals implementation #15207
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
New lazy vals implementation #15207
Conversation
Applied #14780 |
Fixed #15149 |
Wouldn't it be a better idea to use MethodHandles instead of Unsafe? |
TODO: Add test for serialization of non transient lazy val. |
|
for clarity I assume you both mean |
@bishabosha I actually meant getter/setter method handles. As far as I know they provide direct access to the field and do not actually rely on getter/setters. It would be nice to perform some benchmarks for sure. |
AFAIK these do not support atomic operations like CAS, but varhandle is a direct replacement for methods in Unsafe |
e92d489
to
22c6539
Compare
@odersky Could you take a look at this, please? |
Can you re-push that to staging? That way we can collaborate on it. |
Created a new PR to change the source branch: #15296 |
Cleaned up version of #14545
Implementing the new lazy vals scheme mentioned in #6979, fixing #7140
New PR to avoid force pushing to main branch of the previous author.
Fixes #15149 as well