-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Be more conservative on memory effects when args are mutable #52536
Conversation
This is consistent with my analysis. I don't fully understand the design of E.g. |
This modification might be overly conservative. The key insight from the issue is that In the current design of the effect analysis for |
So the confusing thing, is that if we call a function with no args, that calls a function that is |
IIUC |
Can this be closed now that #52548 has been merged? |
So this is a start, but I'm still not satisfied about this, also the same treatment should probably be passed to setfield!. Though I'm not sure if it's also ever going to be valid.
setfield!
requires a mutable argument, so it's never going to bem
.The only way I can see this ever being refined if the types are already known is using escape analysis + getfield/setfield. Which I couldn't find if we do.
Fixes #52531