-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Type checker] Requestify the formation of an abstract generic signature #26802
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
[Type checker] Requestify the formation of an abstract generic signature #26802
Conversation
@swift-ci please smoke test |
@swift-ci please test compiler performance |
Smaller reduction in the number of |
@swift-ci please test |
@swift-ci please test compiler performance |
@swift-ci please test |
@swift-ci please test compiler performance |
Build failed |
Build failed |
Summary for master fullUnexpected test results, excluded stats for RxCocoa, Base64CoderSwiftUI, SwifterSwift Regressions found (see below) Debug-batchdebug-batch briefRegressed (0)
Improved (0)
Unchanged (delta < 1.0% or delta < 100.0ms) (3)
debug-batch detailedRegressed (6)
Improved (1)
Unchanged (delta < 1.0% or delta < 100.0ms) (146)
Releaserelease briefRegressed (0)
Improved (0)
Unchanged (delta < 1.0% or delta < 100.0ms) (3)
release detailedRegressed (0)
Improved (1)
Unchanged (delta < 1.0% or delta < 100.0ms) (20)
|
901a586
to
4d611eb
Compare
@swift-ci please test and merge |
1 similar comment
@swift-ci please test and merge |
4d611eb
to
22df882
Compare
@swift-ci please smoke test and merge |
Introduce a request to form an abstract generic signature given a base signature, additional generic parameters, and additional requirements. It is meant to provide a caching layer in front of the generic signature builder. Switch one direct client of the generic signature builder over to this mechanism, the formation of a generic signature for an existential type.
Eliminates another hardcoded, non-cached use of the generic signature builder.
Partial specialization had its own form of generic signature builder use, which maps well to the new abstract generic signature request. Use it.
…eric signature request
If we are creating a generic signature without any requirements, we can form the signature directly; it's well-formed by definition.
When a request for an abstract generic signature contains noncanonical types, first compute the abstract generic signature for the canonicalized types, then map back to the provided generic parameters. Clients of this request generally work in canonical types already, but it's a small win.
Rather than storing the set of input requirements in a (SIL)SpecializeAttr, store the specialized generic signature. This prevents clients from having to rebuild the same specialized generic signature on every use.
Print the requirements that are in the `@_specialize` signature but aren’t part of the enclosing context, matching the previous form but after semantic analysis.
50e7b39
to
7883dc2
Compare
@swift-ci please smoke test and merge |
1 similar comment
@swift-ci please smoke test and merge |
Introduce a request to form an abstract generic signature given a
base signature, additional generic parameters, and additional
requirements. It is meant to provide a caching layer in front of the
generic signature builder.
Switch a number of direct clients of the generic signature builder over to this
mechanism, including: