-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Finish killing multiple parameter lists #18139
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
Finish killing multiple parameter lists #18139
Conversation
A better approach would be to split off ASTScopeKind::AbstractFunctionSelf from ASTScopeKind::AbstractFunctionParams, but for now, hack things up at the boundary to match the old behavior.
… subclasses Now, an AbstractFunctionDecl always stores a single parameter list. Furthermore, ConstructorDecl and DestructorDecl always store a ParamDecl for 'self'. FuncDecl only has a 'self' if it is a member of a nominal type or extension, so we tail-allocate the storage for it.
@swift-ci Please test |
@swift-ci Please test source compatibility |
@@ -617,27 +617,51 @@ ASTScope *ASTScope::createRoot(SourceFile *sourceFile) { | |||
return scope; | |||
} | |||
|
|||
// FIXME: This is a vestige of multiple parameter lists. | |||
static ParamDecl *getParameter(AbstractFunctionDecl *func, |
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.
@DougGregor I feel really guilty about this :( Sorry about that. I hope one of us finds time to work on ASTScope one day!
Build failed |
Build failed |
apple/swift-lldb#787 |
Final installment in the series after #18128.
In a few places I had to hack things up a bit because the multiple parameter list and uncurry level terminology is so ingrained, in particular in CSDiag. We can clean this up later.
Fixes https://bugs.swift.org/browse/SR-5832.