Skip to content

[ConstraintSystem] NFC: Extract PotentialBinding(s) and auxiliary types/logic into separate header and namespace #35453

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

Merged
merged 5 commits into from
Jan 19, 2021

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Jan 15, 2021

  • Add a new namespace - swift::constraints::inference
  • Place all of the types and logic related to type inference into aforementioned new namespace:
    • PotentialBinding(s) and auxiliary types
    • getPotentialBindingFromRelationalConstraint, checkTypeOfBinding etc.

This is a final step in preparation to storing bindings in constraint graph nodes to
avoid re-computation.

xedin added 5 commits January 15, 2021 15:03
…es into a separate header

Create a new namespace - `swift::constraints::inference` and associate
`PotentialBinding` with it. This way it would be possible for constraint
graph to operate on `PotentialBinding(s)` in the future.
…uct from `ConstraintSystem`

This opens up a posibility of using `PotentialBindings`
in `ConstraintGraphNode` and other places in `ConstraintGraph`.
…traint` into a method on `PotentialBindings`
@xedin xedin requested a review from hborla January 15, 2021 23:09
@xedin
Copy link
Contributor Author

xedin commented Jan 15, 2021

@swift-ci please clean test

@xedin
Copy link
Contributor Author

xedin commented Jan 15, 2021

@swift-ci please test source compatibility

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 48afd65

@xedin
Copy link
Contributor Author

xedin commented Jan 16, 2021

@swift-ci please test macOS platform

Copy link
Member

@hborla hborla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mostly skimmed since this is largely moving code around. The removal of simplifyType from checkTypeOfBinding looks fine. LGTM!

@xedin xedin merged commit 62dc8ce into swiftlang:main Jan 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants