Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Implement dataflow-based const validation #64470
Implement dataflow-based const validation #64470
Changes from all commits
717c64e
457c3aa
e81297d
83a3e04
eec93ca
3a5442a
c2e121d
48d3843
3758e38
908dcb8
3698d04
fc92d3b
c990243
670c84d
27bd849
f2ff425
e296436
b3e59bb
93ee779
bc7928a
406ac2e
2f5ea63
dcecefc
1a14d17
713ec15
ff6faab
a302055
8bfe82b
f2e7faf
ff4158a
0bf1a80
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Giving the module (and submodules) some docs (explaining the overall structure of it, the purpose, etc.) would be good.
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.
True. I'll work on this when we get closer to the end and things are more stable.
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 added a short description in 60ea470aefdd9a3234c83803d3a06cd49559920a.
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.
Maybe this isn't the best name? But I don't have any suggestions right now.
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.
The name of the equivalent data structure in the old code was
ConstCx
, although it was also used for doing promotion inNonConstFn
s. I likeItem
better, but I agree it's still pretty vague.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.
Maybe
ItemValidationInfo
?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 type appears in a lot of function signatures (even more once this alias disappears), so brevity is desirable.
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.
A bit shorter
CheckCtx
?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 defer to others, but I'm not enthusiastic about any of the alternatives. Writing
item.body
anditem.tcx
are clearer to me thancx.body
andcx.tcx
.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.
icx: ItemCtxt
? Just like we havefcx: FnCtxt
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.
In that spirit, maybe
ccx: ConstCtxt
cause it signifies the analysis rather than the item.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.
but
fcx
signifies a function context, soicx
being an item context seems fine 😆I don't have an opinion either way, just wanted to say why it would be consistent.
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.
👍 -- you are right, I think I was considering
LoweringContext
. :)