Skip to content

[Constraint solver] Remove expression from the constructor. #28276

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
Nov 15, 2019

Conversation

DougGregor
Copy link
Member

Rather than setting up the constraint solver with a single expression
(that gets recorded for parents/depths), record each expression that
goes through constraint generation.

NFC. It'll be easier to refactor this when it's not an API on Expr.
Rather than setting up the constraint solver with a single expression
(that gets recorded for parents/depths), record each expression that
goes through constraint generation.
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

Copy link
Contributor

@xedin xedin left a comment

Choose a reason for hiding this comment

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

My two cents are related to the fact that we don't really need to recompute the weights for the individually type-checked sub-expressions in CSDiag all of the sub-CSs could refer to the original one for this.

@DougGregor
Copy link
Member Author

My two cents are related to the fact that we don't really need to recompute the weights for the individually type-checked sub-expressions in CSDiag all of the sub-CSs could refer to the original one for this.

Ah, sure. At the very least, we can look up the chain first.

…tem.

Look first in the base constraint system for this information, so it
only gets built once in the normal case.
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor DougGregor merged commit 0b6ef0d into swiftlang:master Nov 15, 2019
@DougGregor DougGregor deleted the constraint-solver-expr-ctor branch November 15, 2019 06:48
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