-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Fixing some questionable uses of Type::subst() #8497
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
lib/SILOptimizer/Utils/Generics.cpp
Outdated
OriginalParamSubs = CallerParamSubs; | ||
|
||
HasUnboundGenericParams = !SpecializedGenericSig->areAllParamsConcrete(); | ||
createSubstitutedAndSpecializedTypes(); |
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.
Removing all this code from the constructor will break explicit specialization which is used by @_specialize (this constructor is invoked by the EagerSpecializer).
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.
That should be refactored to use the new methods you added though right?
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.
Probably, but explicit and automatic partial specializations have rather different setups. So, please leave this code there for now. I'll re-factor myself once we are there.
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.
Ok, I'll put it back and add a FIXME.
8956e08
to
1c05ae8
Compare
1c05ae8
to
b23624f
Compare
swiftlang/swift-corelibs-foundation#951 @swift-ci Please smoke test Linux |
b23624f
to
3a4c0d8
Compare
@swift-ci Please smoke test |
Fix an odd corner case when UseErrorTypes was off; we would return the empty type if dependent member type substitution failed, but otherwise return the original type if it was a generic type parameter or an archetype. Now, if UseErrorTypes is off, return the empty type in both cases, even if the original type is 'primary'.
3a4c0d8
to
9319a53
Compare
@swift-ci Please smoke test |
No description provided.