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

Lockless LintStore #65193

Merged
merged 18 commits into from
Oct 24, 2019
Merged

Lockless LintStore #65193

merged 18 commits into from
Oct 24, 2019

Commits on Oct 17, 2019

  1. Duplicate lint specifications are always bug!

    Replace early_error and sess.err with bug!, in all cases. If the
    compiler we're running with, including plugins, is registering something
    twice, that's a (compiler/plugin) programmer error -- we should not try
    to be nice at the cost of developer ergononomics (hiding the stacktrace
    of the second registration is bad).
    
    This also is basically a static bug in ~all cases so it should not be a
    detriment to users, including with plugins.
    Mark-Simulacrum committed Oct 17, 2019
    Configuration menu
    Copy the full SHA
    47a443c View commit details
    Browse the repository at this point in the history
  2. De-propagate optional session from lint registration

    This is straight up removing dead code, but is a separate commit from
    the previous to avoid conflating clean up and important changes.
    Mark-Simulacrum committed Oct 17, 2019
    Configuration menu
    Copy the full SHA
    577d442 View commit details
    Browse the repository at this point in the history
  3. Handle lints, not passes in push_lints

    This extracts the call to get_lints() to callers.
    Mark-Simulacrum committed Oct 17, 2019
    Configuration menu
    Copy the full SHA
    2121b04 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    748eccd View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b060f3b View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    e1079c8 View commit details
    Browse the repository at this point in the history
  7. No longer implicitly register lints when registering passes

    This is in preparation for on-demand constructing passes
    Mark-Simulacrum committed Oct 17, 2019
    Configuration menu
    Copy the full SHA
    68c07db View commit details
    Browse the repository at this point in the history
  8. Make get_lints be a static function

    This moves from calling get_lints on instantiated pass objects to the
    raw object
    Mark-Simulacrum committed Oct 17, 2019
    Configuration menu
    Copy the full SHA
    7fef397 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    2454512 View commit details
    Browse the repository at this point in the history
  10. Move to storing constructor functions inside LintStore

    This stops storing the pass objects and instead stores constructor
    functions.
    
    The primary effect is that LintStore no longer has any interior
    mutability.
    Mark-Simulacrum committed Oct 17, 2019
    Configuration menu
    Copy the full SHA
    aa4ee2c View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    c1abc30 View commit details
    Browse the repository at this point in the history
  12. Remove side table of future incompatibility info

    Moves this information to a direct field of Lint, which is where it
    belongs.
    Mark-Simulacrum committed Oct 17, 2019
    Configuration menu
    Copy the full SHA
    7abb1fa View commit details
    Browse the repository at this point in the history
  13. Access future incompatibility information directly

    Avoid querying LintStore when not necessary
    Mark-Simulacrum committed Oct 17, 2019
    Configuration menu
    Copy the full SHA
    c4475c7 View commit details
    Browse the repository at this point in the history
  14. Remove all borrows of lint store from Session from librustc

    Access through tcx is fine -- by that point, the lint store is frozen,
    but direct access through Session will go away in future commits, as
    lint store is still mutable in early stages of Session, and will be
    removed completely.
    Mark-Simulacrum committed Oct 17, 2019
    Configuration menu
    Copy the full SHA
    da56d1d View commit details
    Browse the repository at this point in the history
  15. Create lint store during plugin registration

    Remove lint store from Session
    Mark-Simulacrum committed Oct 17, 2019
    Configuration menu
    Copy the full SHA
    dab3bd6 View commit details
    Browse the repository at this point in the history
  16. Fix test fallout

    Mark-Simulacrum committed Oct 17, 2019
    Configuration menu
    Copy the full SHA
    b761367 View commit details
    Browse the repository at this point in the history
  17. Update API to be more compatible with plugin needs

    Move to using Box<dyn Fn() -> ...> so that we can let plugins register
    state.
    
    This also adds a callback that'll get called from plugin registration so
    that Clippy and other tools can register lints without using the plugin
    API. The plugin API still works, but this new API is more compatible
    with drivers other than rustc.
    Mark-Simulacrum committed Oct 17, 2019
    Configuration menu
    Copy the full SHA
    6be0a70 View commit details
    Browse the repository at this point in the history

Commits on Oct 22, 2019

  1. Configuration menu
    Copy the full SHA
    4e8d1b2 View commit details
    Browse the repository at this point in the history