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

instance: polymorphize upvar closures/generators #75255

Commits on Aug 7, 2020

  1. instance: polymorphize upvar closures/generators

    This commit modifies how instances are polymorphized so that closures
    and generators have any closures or generators captured within their
    upvars also polymorphized - this avoids symbol clashes with the new
    symbol mangling scheme.
    
    Signed-off-by: David Wood <david@davidtw.co>
    davidtwco committed Aug 7, 2020
    Configuration menu
    Copy the full SHA
    d9deced View commit details
    Browse the repository at this point in the history
  2. instance: always polymorphize substs

    By always polymorphizing substitutions, functions which take closures as
    arguments (e.g. `impl Fn()`) can have fewer mono items when some of the
    argument closures can be polymorphized.
    
    Signed-off-by: David Wood <david@davidtw.co>
    davidtwco committed Aug 7, 2020
    Configuration menu
    Copy the full SHA
    0d9924a View commit details
    Browse the repository at this point in the history
  3. ty: add MAY_POLYMORPHIZE flag

    This commit adds a `MAY_POLYMORPHIZE` which checks for closures and
    generators so that polymorphization of substs does not need to traverse
    every substs.
    
    Signed-off-by: David Wood <david@davidtw.co>
    davidtwco committed Aug 7, 2020
    Configuration menu
    Copy the full SHA
    5827b5a View commit details
    Browse the repository at this point in the history
  4. instance: avoid unnecessary mk_ calls

    This commit avoids unnecessary calls to `mk_closure` and `mk_generator`
    by checking if the polymorphized substs match the original substs.
    
    Signed-off-by: David Wood <david@davidtw.co>
    davidtwco committed Aug 7, 2020
    Configuration menu
    Copy the full SHA
    4ccaf6f View commit details
    Browse the repository at this point in the history
  5. instance: polymorphize FnDef substs

    This commit extends previous polymorphization of substs to polymorphize
    `FnDef`.
    
    Signed-off-by: David Wood <david@davidtw.co>
    davidtwco committed Aug 7, 2020
    Configuration menu
    Copy the full SHA
    ac50d61 View commit details
    Browse the repository at this point in the history