Skip to content

[+0-normal-args] Use ManagedValues instead of SILValues in PatternMat… #14639

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

Conversation

gottesmm
Copy link
Contributor

…chEmission::emitSharedCaseBlocks().

This commit hoists the creation of ManagedValues earlier in the function. This
ensures that the SILValues are never separated from their cleanups and allow us
to pass ManagedValues that have proper cleanups to the forwardInto/assignInto
API that is used herethe values into memory at +1. Previously, we would just drop the
cleanup and forward the non-trivial value into memory without a cleanup,
breaking invariants. Since it is just moving things earlier this is a pure /NFC/
change.

As an extra benefit, this updates the code to use more modern SILGen.

rdar://34222540

…chEmission::emitSharedCaseBlocks().

This commit hoists the creation of ManagedValues earlier in the function. This
ensures that the SILValues are never separated from their cleanups and allow us
to pass ManagedValues that have proper cleanups to the forwardInto/assignInto
API that is used herethe values into memory at +1. Previously, we would just drop the
cleanup and forward the non-trivial value into memory without a cleanup,
breaking invariants. Since it is just moving things earlier this is a pure /NFC/
change.

As an extra benefit, this updates the code to use more modern SILGen.

rdar://34222540
@gottesmm
Copy link
Contributor Author

@swift-ci smoke test and merge

@swift-ci swift-ci merged commit 77c575a into swiftlang:master Feb 14, 2018
@gottesmm gottesmm deleted the pr-6ef578f7814ec9de780eba7431cc818c1d0ce9ea branch February 14, 2018 19:28
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