Skip to content
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

Experimental Suppport for async code #59

Draft
wants to merge 58 commits into
base: rewrite-2023
Choose a base branch
from

Conversation

erdmannc
Copy link

@erdmannc erdmannc commented Sep 6, 2024

This draft adds some experimental capabilities to encode async functions as well as additional ways of annotating async functions and suspension points.

Given that encoding async code relies on some parts of the language that are not yet supported by the other encoder parts, this encodes some constructs as dummies in order to produce its encoding. Therefore, the resulting output requires some manual patching in order to verify the original code.

erdmannc added 30 commits May 29, 2024 18:56
* encode future-generators as a domain containing the tupled upvars
* follow opaque type aliases in `most_generic_ty` to treat them as the
  same as the type they point to in the encoding
* add empty dummy domains for types that are pulled in, but are not
  supported yet
* create new aggregate caster to cast future-generator constructor
  arguments
* encode future-generator constructor calls (analogous to ADTs but
  tupling up arguments)
* encode references to dummy variables
* mangle additional characters ('{' '}', '#') appearing in
  future-generator names
* mangle type parameter names, which may be necessary for those
  generated by the compiler (e.g. "<resume_ty>")
* resolve calls to `IntoFuture::into_future` in order to obtain precise
  type information
* replace calls to `Future::poll` by goto for now (for testing)
erdmannc added 28 commits July 30, 2024 20:40
…n-progress due to generator being moved, referenced, pinned etc.)
…iants tying ghost fields to argument snapshots
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