Skip to content

[TaskLocals] Avoid use of defer in back deployed functions in the standard library #62946

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 1 commit into from
Jan 10, 2023

Conversation

tshortli
Copy link
Contributor

Older versions of the 5.8 compiler have a bug when generating SIL for functions with @_backDeploy containing defer blocks (#62444) and for now we need the standard library interface to be compatible with those older compilers.

Resolves rdar://104045168

@tshortli

This comment was marked as resolved.

@tshortli tshortli marked this pull request as draft January 10, 2023 18:37
…tandard library.

Older versions of the 5.8 compiler have a bug when generating SIL for functions with `@_backDeploy` containing defer blocks (swiftlang#62444) and for now we need the standard library interface to be compatible with those older compilers.

Resolves rdar://104045168
@tshortli tshortli force-pushed the avoid-defer-in-backdeployed-funcs branch from 0ee453a to 087aacc Compare January 10, 2023 18:52
@tshortli
Copy link
Contributor Author

@swift-ci please smoke test

@tshortli tshortli marked this pull request as ready for review January 10, 2023 18:54
@tshortli tshortli merged commit 4461f5b into swiftlang:main Jan 10, 2023
@tshortli tshortli deleted the avoid-defer-in-backdeployed-funcs branch January 10, 2023 21:58
tshortli added a commit to tshortli/swift that referenced this pull request May 8, 2023
All compilers that the standard library's textual interface must support:
- Allow back deployed functions to be declared without `@available`.
- Allow back deployed functions to be `@inlinable`.
- Support `defer` blocks in back deployed functions.

We can therefore revert the workarounds added in
swiftlang#62946 and
swiftlang#62928.

Resolves rdar://104085810
tshortli added a commit to tshortli/swift that referenced this pull request May 9, 2023
All compilers that must be able to compile the standard library's textual
interface accept the following:
- back deployed functions declared without `@available`
- `@inlinable` back deployed functions
- `defer` blocks in back deployed functions

We can therefore revert the workarounds added in
swiftlang#62946 and
swiftlang#62928.

Resolves rdar://104085810
nickolas-pohilets pushed a commit to nickolas-pohilets/swift that referenced this pull request May 12, 2023
All compilers that must be able to compile the standard library's textual
interface accept the following:
- back deployed functions declared without `@available`
- `@inlinable` back deployed functions
- `defer` blocks in back deployed functions

We can therefore revert the workarounds added in
swiftlang#62946 and
swiftlang#62928.

Resolves rdar://104085810
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.

1 participant