-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[TypeChecker] NFC: Unify logic in checkDeclarationAvailaibility
and…
#35343
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
Conversation
… `ConstraintSystem::isDeclUnavailable`
})) { | ||
auto &Context = Where.getDeclContext()->getASTContext(); | ||
AvailabilityContext safeRangeUnderApprox{ | ||
AvailabilityInference::availableRange(D, Context)}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@slavapestov Is AvailabilityInference::availableRange(D, Context)
an expensive operation? I could try and make sure that it's done only once is so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it should be pretty cheap. I'll re-run my benchmark with your change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me know how it goes then and I'll merge these changes if everything is fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can go ahead and merge it first
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, 🚀
@swift-ci please smoke test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for doing this, I totally forgot about it!
})) { | ||
auto &Context = Where.getDeclContext()->getASTContext(); | ||
AvailabilityContext safeRangeUnderApprox{ | ||
AvailabilityInference::availableRange(D, Context)}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it should be pretty cheap. I'll re-run my benchmark with your change.
@swift-ci please smoke test Windows platform |
…
ConstraintSystem::isDeclUnavailable