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

Separate impl items from the parent impl #37660

Merged
merged 18 commits into from
Nov 18, 2016

Commits on Nov 16, 2016

  1. refactor Visitor into ItemLikeVisitor and intravisit::Visitor

    There are now three patterns (shallow, deep, and nested visit).  These
    are described in detail on the docs in `itemlikevisit::ItemLikeVisitor`.
    nikomatsakis committed Nov 16, 2016
    Configuration menu
    Copy the full SHA
    36fbf8c View commit details
    Browse the repository at this point in the history
  2. separate impl-items from the impl in the HIR

    This commit does not change how the incremental accounting is done, so
    changes (or accessses) to an impl-item are still tagged to the enclosing
    impl.
    
    This commits adds the "main guts" of this change. It does not build on
    its own.
    nikomatsakis committed Nov 16, 2016
    Configuration menu
    Copy the full SHA
    b889259 View commit details
    Browse the repository at this point in the history
  3. fallout from separating impl-items from impls

    Basically adding `visit_impl_item` in various places and so forth.
    nikomatsakis committed Nov 16, 2016
    Configuration menu
    Copy the full SHA
    3fd67eb View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    eeb45c7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7918299 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    ae8cb22 View commit details
    Browse the repository at this point in the history
  7. move the impl-params-constrained check out of collect

    This helps with incr. comp. because otherwise the Collect(Impl) check
    winds up touching all of the impl items; since Collect(Impl) also
    produces the types for the impl header, this creates a polluted graph
    where the impl types depend on the impl items.
    nikomatsakis committed Nov 16, 2016
    Configuration menu
    Copy the full SHA
    4a4c61b View commit details
    Browse the repository at this point in the history
  8. move convert_impl_item into the main loop

    This is better because the edges will be accounted to
    the impl item itself
    nikomatsakis committed Nov 16, 2016
    Configuration menu
    Copy the full SHA
    29a39ab View commit details
    Browse the repository at this point in the history
  9. move duplicate checking into TypeCheck

    This completes the effort to not touch the impl-items during
    `Collect(Impl)`.
    nikomatsakis committed Nov 16, 2016
    Configuration menu
    Copy the full SHA
    4df5288 View commit details
    Browse the repository at this point in the history
  10. add a nested_visit_map method

    This allows you to enable *all* nested visits in a future-compatible
    sort of way. Moreover, if you choose to override the `visit_nested`
    methods yourself, you can "future-proof" against omissions by overriding
    `nested_visit_map` to panic.
    nikomatsakis committed Nov 16, 2016
    Configuration menu
    Copy the full SHA
    26d1500 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    629f5ff View commit details
    Browse the repository at this point in the history

Commits on Nov 17, 2016

  1. when creating an AssociatedItem, read data from impl, not impl item

    Before, when we created an AssociatedItem for impl item X, we would read
    the impl item itself. Now we instead load up the impl I that contains X
    and read the data from the `ImplItemRef` for X; actually, we do it for
    all impl items in I pre-emptively.
    
    This kills the last source of edges between a method X and a call to a
    method Y defined in the same impl.
    
    Fixes rust-lang#37121
    nikomatsakis committed Nov 17, 2016
    Configuration menu
    Copy the full SHA
    34c361c View commit details
    Browse the repository at this point in the history
  2. move impl wf check so they occur earlier

    Needed to keep coherence from freaking out.
    nikomatsakis committed Nov 17, 2016
    Configuration menu
    Copy the full SHA
    c17be9e View commit details
    Browse the repository at this point in the history
  3. hash the contents of impl-item-ref by adding them to visitor

    Also simplify some of the `ty::AssociatedItem` representation,
    in particular by folding `has_value` into `hir::Defaultness`
    nikomatsakis committed Nov 17, 2016
    Configuration menu
    Copy the full SHA
    b10b981 View commit details
    Browse the repository at this point in the history
  4. fix oversight in closure translation

    (Unrelated to this PR series)
    nikomatsakis committed Nov 17, 2016
    Configuration menu
    Copy the full SHA
    b8116da View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    4e844ad View commit details
    Browse the repository at this point in the history
  6. canonicalize base incremental path on windows

    This sidesteps problems with long paths because the canonical path
    includes the "magic long path prefix" on Windows.
    nikomatsakis committed Nov 17, 2016
    Configuration menu
    Copy the full SHA
    ab79438 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    c938007 View commit details
    Browse the repository at this point in the history