mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Serialization: Don't serialize the 'self' parameter
This commit is contained in:
@@ -3157,7 +3157,6 @@ void Serializer::writeDecl(const Decl *D) {
|
||||
fn->hasDynamicSelf(),
|
||||
fn->hasForcedStaticDispatch(),
|
||||
fn->hasThrows(),
|
||||
fn->getParameterLists().size(),
|
||||
addGenericEnvironmentRef(
|
||||
fn->getGenericEnvironment()),
|
||||
addTypeRef(ty),
|
||||
@@ -3175,8 +3174,7 @@ void Serializer::writeDecl(const Decl *D) {
|
||||
writeGenericParams(fn->getGenericParams());
|
||||
|
||||
// Write the body parameters.
|
||||
for (auto pattern : fn->getParameterLists())
|
||||
writeParameterList(pattern);
|
||||
writeParameterList(fn->getParameterLists().back());
|
||||
|
||||
if (auto errorConvention = fn->getForeignErrorConvention())
|
||||
writeForeignErrorConvention(*errorConvention);
|
||||
@@ -3314,10 +3312,10 @@ void Serializer::writeDecl(const Decl *D) {
|
||||
nameComponentsAndDependencies);
|
||||
|
||||
writeGenericParams(ctor->getGenericParams());
|
||||
|
||||
assert(ctor->getParameterLists().size() == 2);
|
||||
// Why is this writing out the param list for self?
|
||||
for (auto paramList : ctor->getParameterLists())
|
||||
writeParameterList(paramList);
|
||||
writeParameterList(ctor->getParameterLists().back());
|
||||
|
||||
if (auto errorConvention = ctor->getForeignErrorConvention())
|
||||
writeForeignErrorConvention(*errorConvention);
|
||||
break;
|
||||
@@ -3337,9 +3335,6 @@ void Serializer::writeDecl(const Decl *D) {
|
||||
addGenericEnvironmentRef(
|
||||
dtor->getGenericEnvironment()),
|
||||
addTypeRef(dtor->getInterfaceType()));
|
||||
assert(dtor->getParameterLists().size() == 1);
|
||||
// Why is this writing out the param list for self?
|
||||
writeParameterList(dtor->getParameterLists()[0]);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user