Skip to content
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

[silgenpattern] Fix pattern emission of tuples with address only and … #19959

Merged

Conversation

gottesmm
Copy link
Member

…loadable components.

The problem here was that if we had a tuple with mixed address only and loadable
components and we used take on success during pattern matching, we would load
the loadable component with a load [take] and then pass it as take on success.
Instead we load the loadable components of the tuple using a load_borrow and
make the cast consumption kind BorrowAlways.

This can not happen with enum element emission since enum element emission does
not support take_on_success so the problem can not occur there.

SR-9029
rdar://45345844

…loadable components.

The problem here was that if we had a tuple with mixed address only and loadable
components and we used take on success during pattern matching, we would load
the loadable component with a load [take] and then pass it as take on success.
Instead we load the loadable components of the tuple using a load_borrow and
make the cast consumption kind BorrowAlways.

This can not happen with enum element emission since enum element emission does
not support take_on_success so the problem can not occur there.

SR-9029
rdar://45345844
@gottesmm
Copy link
Member Author

@clackary I think this fixes the source compat stuff.

@gottesmm
Copy link
Member Author

@swift-ci smoke test

@gottesmm
Copy link
Member Author

@swift-ci test source compatibility

@gottesmm
Copy link
Member Author

I tested locally that fluent/SwiftLint are passing now.

@gottesmm
Copy link
Member Author

18:26:44 UPASS: https://bugs.swift.org/browse/SR-9029, fluent, 4.2, 270b6f, Swift Package
18:26:44 UPASS: https://bugs.swift.org/browse/SR-9029, SwiftLint, 4.2, 60f98e, Swift Package
18:26:44 UPASS: https://bugs.swift.org/browse/SR-9029, SwiftLint, 4.0, 60f98e, Swift Package

Copy link
Member

@jckarter jckarter left a comment

Choose a reason for hiding this comment

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

LGTM

@gottesmm
Copy link
Member Author

It looks like the reactive cocoa/reactive swift failures aren't mine. They are occuring already here:

https://ci.swift.org/view/all/job/swift-master-source-compat-suite-debug/323/console

gottesmm added a commit to gottesmm/swift-source-compat-suite that referenced this pull request Oct 20, 2018
@gottesmm
Copy link
Member Author

Got ufails also on the release build. I want to get this in... committing!

@gottesmm
Copy link
Member Author

erm UPasses ; ).

@gottesmm gottesmm merged commit c8dd802 into apple:master Oct 20, 2018
@gottesmm gottesmm deleted the pr-b6f7d0f66251897bb96ee6da079f165aa7aa144f branch October 20, 2018 02:05
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.

None yet

2 participants