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

Try to break resolve into more isolated parts #63400

Merged
merged 8 commits into from
Aug 10, 2019

Commits on Aug 10, 2019

  1. resolve: Move late resolution into a separate visitor

    Move `Resolver` fields specific to late resolution to the new visitor.
    The `current_module` field from `Resolver` is replaced with two `current_module`s in `LateResolutionVisitor` and `BuildReducedGraphVisitor`.
    Outside of those visitors `current_module` is replaced by passing `parent_scope` to more functions and using the parent module from it.
    
    Visibility resolution no longer have access to later resolution methods and has to use early resolution, so its diagnostics in case of errors regress slightly.
    petrochenkov committed Aug 10, 2019
    Configuration menu
    Copy the full SHA
    e2e8746 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ff85d1c View commit details
    Browse the repository at this point in the history
  3. resolve: Track whole parent scope in the visitors

    Instead of tracking current module and other components separately.
    (`ParentScope` includes the module as a component.)
    petrochenkov committed Aug 10, 2019
    Configuration menu
    Copy the full SHA
    df03e42 View commit details
    Browse the repository at this point in the history
  4. resolve: Remove Deref<Target=Resolver> implementations

    It's now immediately clear what fields belong to the global resolver state and what are specific to passes/visitors.
    petrochenkov committed Aug 10, 2019
    Configuration menu
    Copy the full SHA
    6a347f3 View commit details
    Browse the repository at this point in the history
  5. resolve: Turn resolve_error into a method on Resolver

    Rename it to `report_error` and move into `diagnostics.rs`
    
    Also turn `check_unused` into a method on `Resolver`
    petrochenkov committed Aug 10, 2019
    Configuration menu
    Copy the full SHA
    9c86ce7 View commit details
    Browse the repository at this point in the history
  6. resolve: Move some more code around

    Move methods logically belonging to build-reduced-graph into `impl BuildReducedGraphVisitor` and `build_reduced_graph.rs`
    Move types mostly specific to late resolution closer to the late resolution visitor
    petrochenkov committed Aug 10, 2019
    Configuration menu
    Copy the full SHA
    f360d79 View commit details
    Browse the repository at this point in the history
  7. Fix calls to resolver from rustdoc and HIR lowering

    Cleanup some surrounding code.
    Support resolution of intra doc links in unnamed block scopes.
    (Paths from rustdoc now use early resolution and no longer need results of late resolution like all the built ribs.)
    
    Fix one test hitting file path limits on Windows.
    petrochenkov committed Aug 10, 2019
    Configuration menu
    Copy the full SHA
    8cc8133 View commit details
    Browse the repository at this point in the history
  8. resolve: Address FIXME from the previous commit

    Make the `is_import` flag in `ScopeSet` independent from namespace
    Fix rebase
    petrochenkov committed Aug 10, 2019
    Configuration menu
    Copy the full SHA
    319f0de View commit details
    Browse the repository at this point in the history