-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
AstGen: avoid intermediate loads during field/array access #19347
Conversation
The AstGen change here causes "local variable is never mutated" errors to not be emitted when they should, because that error is based on when a local variable is never accessed with a ref result location. I'll let you decide how best to handle this - perhaps you could introduce a |
aa57661
to
b97ae63
Compare
b97ae63 should be documented in langref? |
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.
This change needs to come with benchmarks, an analysis of the differences in ZIR, and an overview explanation.
I can't think of a way to get this to work right now and the latent bugs its uncovering aren't making it any easier. |
There should probably be a check that the access chain ends in a symbol since other cases could still use the
_val
versions?Closes #15685
Closes #15280
Closes #12963