Skip to content

Remove some usages of InOutType #17043

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

Conversation

slavapestov
Copy link
Contributor

Most callers did not want the InOutType here, and checked
the ParamDecl's flags instead.

@slavapestov
Copy link
Contributor Author

@CodaFi I still have to update the AST printer, there's some stuff in code completion that's suspect as well.

@slavapestov
Copy link
Contributor Author

@CodaFi Also I'd like to get rid of AnyFunctionType::Param::getType(), and replace all usages with getPlainType() (which can be renamed back to getType() when done).

@slavapestov slavapestov force-pushed the small-progress-on-killing-inout-type branch from 54e3dcf to 44971fa Compare June 13, 2018 06:30
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov slavapestov changed the title AST: Remove hack-around for getInterfaceType() on ParamDecl returning InOutType Remove some usages of InOutType Jun 13, 2018
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

NFC for now, but by not looking at the FunctionType of the AST Decl,
we no longer pass an InOutType to type lowering here, which won't be
supported soon.
… InOutType

Most callers did not want the InOutType here, and checked
the ParamDecl's flags instead.
There is still some unfortunate hackery around InOutType in
SILGenProlog.cpp, but I don't want to clean it up yet.
@slavapestov slavapestov force-pushed the small-progress-on-killing-inout-type branch from 44971fa to 1955778 Compare June 13, 2018 22:41
// FIXME: Should this check if the lowered SILType is address only
// instead? Otherwise optionals of archetypes etc will still have
// 'Unwrap' set to false.
bool Unwrap = VarInfo->Constant || SILTy.is<ArchetypeType>();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dcci @adrian-prantl It looks like this wasn't doing anything, so I removed it.

Copy link
Member

Choose a reason for hiding this comment

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

Looks fine to me if it sticks together.

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test macOS

@adrian-prantl
Copy link
Contributor

@swift-ci test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 1955778

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test macOS

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 54e3dcf60e39bda4f3416b851220554d6a4b8fab

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

1 similar comment
@shahmishal
Copy link
Member

@swift-ci Please test source compatibility

@slavapestov slavapestov merged commit cd5d738 into swiftlang:master Jun 14, 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.

5 participants