Skip to content

Fix IRGen for swift_task_create after Nate's async function pointer changes #34725

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

aschwaighofer
Copy link
Contributor

@aschwaighofer aschwaighofer commented Nov 13, 2020

This adjusts createAsyncTask lowering for #34589

nate-chandler and others added 9 commits November 12, 2020 18:20
ClassMetadataLayout::getOffsett -> ClassMetadataLayout::getOffset
Two LinkEntities are needed to enable the construction during both IRGen
and TBDGen.
In order to call async functions, instances of the AsyncFunctionPointer
struct must be used.  If those functions are exported from a module, the
AsyncFunctionPointer by means of which the function is to be called must
be exported as well.

For now, the symbol is exported by manually appending the relevant
suffix to the mangled name of the function.
An AsyncFunctionPointer, defined in Task.h, is a struct consisting of
two i32s: (1) the relative address of the async function and (2) the
size of the async context to be allocated when calling that function.

Here, such structs are emitted for every async SILFunction that is
emitted.
While the pointer auth details are worked out, to unblock other work,
disable the tests on arm64e where they will fail until those details are
worked out.
@aschwaighofer
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 32ecd35

@aschwaighofer
Copy link
Contributor Author

@swift-ci Please test linux

@aschwaighofer aschwaighofer merged commit a78e82c into swiftlang:main Nov 13, 2020
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.

3 participants