Skip to content

[CS] A couple of cleanups #31155

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 3 commits into from
Apr 21, 2020
Merged

Conversation

hamishknight
Copy link
Contributor

  • Remove ConstraintGraph::removeEdge, using retireConstraint instead.
  • Avoid recording constraints as both "generated" and "retired".
  • Clarify a doc comment.

The only caller was `contractEdges`, which would
only call it with constraints from either the
active or inactive list. The implementation can
therefore be replaced by
`ConstraintSystem::retireConstraint`, and
`removeGeneratedConstraint` can also be removed.
Retired constraints get added back to the inactive
list when a scope rolls back, and generated
constraints then get removed. So adding a
constraint as both is unnecessary.

Also assert that `addNewFailingConstraint` doesn't
get called with an active constraint.
The fully-boundness refers to the system
rather than the bindings.
@hamishknight hamishknight requested a review from xedin April 20, 2020 15:55
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@xedin
Copy link
Contributor

xedin commented Apr 20, 2020

@swift-ci please test source compatibility

@swiftlang swiftlang deleted a comment from swift-ci Apr 20, 2020
@hamishknight
Copy link
Contributor Author

@swift-ci please test macOS

@hamishknight
Copy link
Contributor Author

@swift-ci please test source compatibility

@hamishknight
Copy link
Contributor Author

Debug source compat failure is unrelated.

@hamishknight hamishknight merged commit 49ca2d0 into swiftlang:master Apr 21, 2020
@hamishknight hamishknight deleted the too-edgy-for-me branch April 21, 2020 02:06
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