Skip to content

[ConstraintSystem] Infer some of the bindings attributes on demand #34737

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 16, 2020

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Nov 13, 2020

One step closer to being able to make potential binding inference incremental.

Let's make most of the flags in PotentialBindings be computed on demand based
on information captured in the bindings, including:

  • IsHole - could be determined based on a presence of a single binding to a hole type;
  • NumDefaultableBindings - just a number of bindings originated in defaultable constraint;
  • IsPotentiallyIncomplete - determined based on bindings and locator;
  • SubtypeOfExistentialType - determined based on recorded bindings;

Most of the flags here are only used for ranking and recorded in a BindingScore
so don't have to be re-computed multiple times.

@xedin xedin requested a review from hborla November 13, 2020 21:52
@xedin
Copy link
Contributor Author

xedin commented Nov 13, 2020

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Nov 13, 2020

@swift-ci please test source compatibility

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - afa1198

@xedin
Copy link
Contributor Author

xedin commented Nov 14, 2020

@swift-ci please test Linux platform

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - afa1198

@xedin
Copy link
Contributor Author

xedin commented Nov 14, 2020

@nkcsgexi @artemcm Linux CI is failing with:

/home/buildnode/jenkins/workspace/swift-PR-Linux/branch-main/swift-driver/Tests/SwiftDriverTests/IncrementalCompilationTests.swift:15:18: error: module 'SwiftDriver' was not compiled for testing
19:20:48 @testable import SwiftDriver
19:20:48 ~~~~~~~~~~       ^

@artemcm
Copy link
Contributor

artemcm commented Nov 14, 2020

@nkcsgexi @artemcm Linux CI is failing with:

/home/buildnode/jenkins/workspace/swift-PR-Linux/branch-main/swift-driver/Tests/SwiftDriverTests/IncrementalCompilationTests.swift:15:18: error: module 'SwiftDriver' was not compiled for testing
19:20:48 @testable import SwiftDriver
19:20:48 ~~~~~~~~~~       ^

Investigating! Thanks.

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - afa1198

@xedin
Copy link
Contributor Author

xedin commented Nov 14, 2020

@swift-ci please test

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.

Nice!

@xedin xedin merged commit 094ca80 into swiftlang:main Nov 16, 2020
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.

4 participants