Skip to content

[5.5][Concurrency] Add an exported symbol on Darwin that contains the frame pointer flag bit for async frames. #38317

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

mikeash
Copy link
Contributor

@mikeash mikeash commented Jul 8, 2021

Cherry-pick #38290 to 5.5.

The symbol is swift_async_extendedFramePointerFlags. Since the value doesn't need to be dynamically computed, we save a level of indirection by emitting a fake global variable whose address is the value we want, similar to objc_absolute_packed_isa_class_mask.

This bit is mixed in to the frame pointer address stored on the stack to signal that a frame is an async frame. The compiler can emit code that ORs in the address of this symbol to apply the appropriate flag when it doesn't know the flag statically.

rdar://80277146

… frame pointer flag bit for async frames.

The symbol is swift_async_extendedFramePointerFlags. Since the value doesn't need to be dynamically computed, we save a level of indirection by emitting a fake global variable whose address is the value we want, similar to objc_absolute_packed_isa_class_mask.

This bit is mixed in to the frame pointer address stored on the stack to signal that a frame is an async frame. The compiler can emit code that ORs in the address of this symbol to apply the appropriate flag when it doesn't know the flag statically.

rdar://80277146
(cherry picked from commit 0d67212)
@mikeash mikeash requested a review from DougGregor July 8, 2021 21:25
@mikeash mikeash requested a review from a team as a code owner July 8, 2021 21:25
@mikeash
Copy link
Contributor Author

mikeash commented Jul 8, 2021

@swift-ci please test

@DougGregor DougGregor merged commit daf6d57 into swiftlang:release/5.5 Jul 9, 2021
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