-
Notifications
You must be signed in to change notification settings - Fork 80
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
core: Add support for nested inferrence in IRDL #2005
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #2005 +/- ##
==========================================
+ Coverage 90.03% 90.04% +0.01%
==========================================
Files 289 289
Lines 35768 35882 +114
Branches 5275 5287 +12
==========================================
+ Hits 32202 32309 +107
- Misses 2814 2818 +4
- Partials 752 755 +3 ☔ View full report in Codecov by Sentry. |
PapyChacal
approved these changes
Jan 23, 2024
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.
Yaaay 🚀
superlopuh
reviewed
Jan 23, 2024
superlopuh
reviewed
Jan 23, 2024
superlopuh
reviewed
Jan 23, 2024
superlopuh
reviewed
Jan 24, 2024
superlopuh
reviewed
Jan 24, 2024
superlopuh
approved these changes
Jan 24, 2024
Co-authored-by: Sasha Lopoukhine <superlopuh@gmail.com>
c739a33
to
0e867f0
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR allows us to infer the types of some operands and results from the types of other operands and results.
It does so by adding three functions in
AttrConstraint
:get_resolved_variables
: This function returns the set ofConstraintVar
that will be set during verification.can_infer
: ReturnsTrue
if we can infer a unique attribute represented by theAttrConstraint
from the assignment ofConstraintVar
.infer
: Returns the only attribute that satisfy this constraint, given the constraint variables.We use these methods to get all
ConstraintVar
from the parsed operand/result types present in the syntax, then infer the constraints on the types that are not in the syntax.