Skip to content

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