Skip to content

[lldb][swift] Add support for async_let step-over #9628

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

felipepiovezan
Copy link

Supporting stepping over async let constructs require knowledge about two new trampolines, which are described in the second commit here.
The first NFC commit factors out some code to minimize the diff of the second commit and enable code re-use.

@felipepiovezan felipepiovezan requested review from adrian-prantl and removed request for JDevlieghere November 19, 2024 00:39
This will enable us to share code and handle more functions similar to
swift_task_switch in a subsequent commit.
The use of `async let` in swift introduces two new trampolines that may
trigger a task switch:
1. `swift_asyncLet_get`, which gets called upon `await`ing an `async
   let` variable.
2. `swift_asyncLet_finish`, which gets called when the `async let`
   variable goes out of scope.

We need step through plans for both of those.
@felipepiovezan felipepiovezan force-pushed the felipe/fix_async_let_step_over branch from aa4ea85 to 405a791 Compare November 19, 2024 00:41
@felipepiovezan
Copy link
Author

@swift-ci test

import lldbsuite.test.lldbutil as lldbutil


@skipIfAsan # rdar://138777205

Choose a reason for hiding this comment

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

Is this still needed?

Copy link
Author

Choose a reason for hiding this comment

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

Oh, good point, it shouldn't be needed anymore. There are a handful of tests with this annotation, so I'll merge this as is and post another PR to remove all of them.

@felipepiovezan felipepiovezan merged commit bfe3e67 into swiftlang:stable/20240723 Nov 19, 2024
3 checks passed
@felipepiovezan felipepiovezan deleted the felipe/fix_async_let_step_over branch November 19, 2024 17:30
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