Skip to content

[ConstraintSystem] Remove ConstraintSystemFlags::ReusePrecheckedType. #59821

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
Jul 1, 2022

Conversation

hborla
Copy link
Member

@hborla hborla commented Jun 30, 2022

This change removes the last use of ConstraintSystemFlags::ReusePrecheckedType in operator code completion, and removes the option altogether from the constraint system.

Now that operator code completion uses an opaque value placeholder with the pre-checked type, code completion no longer needs to send a type checked AST through the constraint system, which was very brittle. Opaque value placeholder expressions were designed to be used as a placeholder for a fully type checked expression, making this a better approach for code completion paths that haven't yet been ported to solver-based completion.

hborla added 3 commits June 30, 2022 12:22
Now that operator code completion uses opaque placeholder exprs,
there's no need to pass the flag to use prechecked types in the
constraint system.
@hborla hborla requested review from xedin and ahoppen June 30, 2022 21:41
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.

Looks great!

@xedin
Copy link
Contributor

xedin commented Jun 30, 2022

@swift-ci Please SourceKit stress test

@hborla
Copy link
Member Author

hborla commented Jul 1, 2022

@swift-ci please smoke test

@hborla
Copy link
Member Author

hborla commented Jul 1, 2022

Heh, looks like the SourceKit stress test "failed" because it expected #58891 to fail, but it was fixed by #59740

Copy link
Member

@ahoppen ahoppen left a comment

Choose a reason for hiding this comment

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

😍 One step closer to never type checking an expression twice.

@hborla hborla merged commit 48ada41 into swiftlang:main Jul 1, 2022
@hborla hborla deleted the remove-reuse-prechecked-type branch July 1, 2022 15:12
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