Skip to content

Optimize getter keypath patterns #29160

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

Closed
wants to merge 5 commits into from

Conversation

zoecarver
Copy link
Contributor

This patch reworks the createKeypathProjections function so that it can handle multiple kinds of keypath components. It also adds support for projecting getter keypaths (i.e. subscripts).

const KeyPathPatternComponent &comp) {
assert(comp.getKind() == KeyPathPatternComponent::Kind::GettableProperty);

if (!addr->getType().getStructOrBoundGenericStruct() &&
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 really understand why this is (or would be) needed but I left it in just in case.

@theblixguy
Copy link
Collaborator

I think this is already addressed by #28799

@zoecarver
Copy link
Contributor Author

@theblixguy thanks for pointing that out. That patch is much more comprehensive.

Closing in favor of #28799

@zoecarver zoecarver closed this Jan 13, 2020
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.

2 participants