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

Avoid GenFuture shim when compiling async constructs #104321

Merged
merged 1 commit into from
Nov 24, 2022

Commits on Nov 24, 2022

  1. Avoid GenFuture shim when compiling async constructs

    Previously, async constructs would be lowered to "normal" generators,
    with an additional `from_generator` / `GenFuture` shim in between to
    convert from `Generator` to `Future`.
    
    The compiler will now special-case these generators internally so that
    async constructs will *directly* implement `Future` without the need
    to go through the `from_generator` / `GenFuture` shim.
    
    The primary motivation for this change was hiding this implementation
    detail in stack traces and debuginfo, but it can in theory also help
    the optimizer as there is less abstractions to see through.
    Swatinem committed Nov 24, 2022
    Configuration menu
    Copy the full SHA
    9f36f98 View commit details
    Browse the repository at this point in the history