Skip to content

[Async CC] Added conveniences to retrieve arguments. #34453

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

nate-chandler
Copy link
Contributor

Because all async functions have the same signature, namely

void(%swift.task*, %swift.executor*, %swift.context*)

it is always possible to provide access to the three argument values (the current task, current executor, and current context) within an IRGenFunction which is async. Here, that is provided in the form of IRGenFunction::getAsyncExecutor and IRGenFunction::getAsyncContext, and IRGenFunction::getAsyncTask.

Because all async functions have the same signature, namely

  void(%swift.task*, %swift.executor*, %swift.context*)

it is always possible to provide access to the three argument values
(the current task, current executor, and current context) within an
IRGenFunction which is async.  Here, that is provided in the form of
IRGenFunction::getAsyncExecutor,IRGenFunction::getAsyncContext, and
IRGenFunction::getAsyncTask.
@nate-chandler
Copy link
Contributor Author

@swift-ci please test and merge

@nate-chandler nate-chandler changed the title [Async CC] Added conveniences to retrieve argumments. [Async CC] Added conveniences to retrieve arguments. Oct 27, 2020
@nate-chandler nate-chandler force-pushed the concurrency/irgen/argument-conveniences branch from 75b7b4f to a5b9e86 Compare October 27, 2020 03:28
@nate-chandler
Copy link
Contributor Author

@swift-ci please test and merge

@nate-chandler
Copy link
Contributor Author

@swift-ci please test windows platform

@swift-ci swift-ci merged commit d6227dc into swiftlang:main Oct 27, 2020
@nate-chandler nate-chandler deleted the concurrency/irgen/argument-conveniences branch July 5, 2023 23: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