-
-
Notifications
You must be signed in to change notification settings - Fork 608
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
Fix bugzilla issue 24846 - atomicLoad does not work for class arguments with -preview=nosharedaccess #17053
Conversation
|
Thanks for your pull request and interest in making D better, @rikkimax! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "stable + dmd#17053" |
|
can this not be fixed in druntime? |
a07c8df
to
fb51928
Compare
I can't see how. *cast(shared(inout(Foo))*)resultValuePtrThat has to be replaced. Keep in mind |
fb51928
to
c5ff67d
Compare
IIRC that should then be an unsafe operation, and should therefore be trusted. |
Yes, but I don't see any |
c5ff67d
to
5f1de84
Compare
|
This was my thought, too, that the whole "nosharedaccess" logic should only be active in Now, to be fair, you can already cast away shared, which is naturally |
5f1de84
to
f3db2cb
Compare
There is no reason to do this. By not using core.atomic you are bypassing any optimization opportunity that the compiler can offer you. Doing it yourself is both platform specific and compiler IR specific. |
It depends a lot on the situation, you might be able to use compiler intrinsics, too, but he building blocks in |
|
If we want to turn this on only in |
…ts with -preview=nosharedaccess
f3db2cb
to
ace7cea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like this approach, but lets get this fix in
No description provided.