Skip to content
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

Recursive solver factoring and privacy #513

Merged

Conversation

nikomatsakis
Copy link
Contributor

This branch just starts to factor the recursive solver into a few more files, and tightens up some of the privacy.

My goal was to try and better separate out the "caching and loop logic", which I hope to eventually move to salsa, from the chalk-specific logic. For now I got as far as moving most of the chalk-specific stuff into the solve module.

The next step is going to be trying to factor out the caching stuff into a module that is generic over chalk-specific things, but that's for another day.

@nikomatsakis nikomatsakis changed the title Recursive factoring and privacy Recursive solve factoring and privacy Jun 10, 2020
@nikomatsakis nikomatsakis changed the title Recursive solve factoring and privacy Recursive solver factoring and privacy Jun 10, 2020
In particular, the `solve_iteration` method depends only on
`SolveDatabase`` (as does `Fulfill`). The expectation is that the
`solve_goal` method will eventually be a callback into salsa or the host
integration -- potentially this trait will merge with `RustIrDatabase`
Copy link
Member

@jackh726 jackh726 left a comment

Choose a reason for hiding this comment

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

This LGTM. Mostly just moving things around right?

}
}

impl<S, I> SolveIterationHelpers<I> for S
Copy link
Member

Choose a reason for hiding this comment

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

Wait, extra?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are two traits -- one is the public method, the other is the private helpers, and you need an impl for both.

@nikomatsakis nikomatsakis merged commit 1781c43 into rust-lang:master Jun 11, 2020
@nikomatsakis
Copy link
Contributor Author

(Yes, it's just moving things around)

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.

2 participants