Skip to content

Remove FunctionType::getInput() #19560

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

Merged
merged 4 commits into from
Sep 27, 2018

Conversation

slavapestov
Copy link
Contributor

@slavapestov slavapestov commented Sep 26, 2018

I switched the handful of remaining uses to explicitly call AnyFunctionType::composeInput(). We still don't want to do that for non-materializable tuple types, but surfacing it there allows the code to be refactored later, and means we don't have to store the input type inside the FunctionType anymore. Also, rename AnyFunctionType::Param::getType() to getOldType(), since InOutType will be removed at some point.

@slavapestov slavapestov force-pushed the remove-functype-getinput branch from 23d8654 to 3b60ae1 Compare September 26, 2018 18:11
@slavapestov slavapestov changed the title Remove FunctionType::getInput() [WIP] Remove FunctionType::getInput() Sep 26, 2018
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

@@ -192,17 +192,17 @@ DeclName TypeChecker::getObjectLiteralConstructorName(ObjectLiteralExpr *expr) {
/// unambiguous name.
Type TypeChecker::getObjectLiteralParameterType(ObjectLiteralExpr *expr,
ConstructorDecl *ctor) {
Type argType = ctor->getArgumentInterfaceType();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With some light refactoring in CSDiag, this can be made to speak in terms of params as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't feel any great urgency in doing that at this point in time. Using composeInput() on arbitrary (non-tuple-splattable) argument lists is certainly blocking InOutType removal. However, a much bigger task blocking that is the ApplyExpr argument list representation. And also, CSDiag is currently on the way out. So it may very well happen that CSDiag will be mostly gutted before we move on to the next step of this refactoring.

Copy link
Contributor

@CodaFi CodaFi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great progress

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 3b60ae1

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 3b60ae1

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 3b60ae1

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 3b60ae1

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 3b60ae1

@slavapestov
Copy link
Contributor Author

apple/swift-lldb#936
@swift-ci Please test

@slavapestov slavapestov merged commit 8c94b38 into swiftlang:master Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants