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

Make dataflow-based const qualification the canonical one #66385

Merged
merged 17 commits into from
Nov 17, 2019

Commits on Nov 15, 2019

  1. Configuration menu
    Copy the full SHA
    1924cc8 View commit details
    Browse the repository at this point in the history
  2. Remove requires_sync

    ecstatic-morse committed Nov 15, 2019
    Configuration menu
    Copy the full SHA
    dbae15a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4881104 View commit details
    Browse the repository at this point in the history
  4. Enable standalone const-checking with Validator

    Unlike the original pass, we check *every* non-cleanup basic block
    instead of stopping at `SwitchInt`. We use the `is_cfg_cyclic` function
    to check for loops unlike the original checker which could not differentiate
    between true cycles and basic blocks with more than two predecessors.
    
    The last three functions are all copied verbatim from `qualify_consts`.
    ecstatic-morse committed Nov 15, 2019
    Configuration menu
    Copy the full SHA
    973b16a View commit details
    Browse the repository at this point in the history
  5. Use new const-checker for mir_const_qualif

    Now `mir_const_qualif` must be called for `static`s and `const fn`s as
    well as `const`s since it is responsible for const-checking. We return
    the qualifs in the return place for everything, even though they will
    only be used for `const`s.
    ecstatic-morse committed Nov 15, 2019
    Configuration menu
    Copy the full SHA
    55da0c0 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    6d4e204 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    7527766 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    3d2bc50 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    c8156b9 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    8f5494b View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    d1f0ef5 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    9a2e53a View commit details
    Browse the repository at this point in the history
  13. A Downcast is now reached when const-checking a for loop

    I believe this occurs because the old checker stopped processing basic
    blocks after a `SwitchInt`.
    ecstatic-morse committed Nov 15, 2019
    Configuration menu
    Copy the full SHA
    a4ce201 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    056edc0 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    1e840f8 View commit details
    Browse the repository at this point in the history
  16. Fix nits from review

    ecstatic-morse committed Nov 15, 2019
    Configuration menu
    Copy the full SHA
    ea95e94 View commit details
    Browse the repository at this point in the history
  17. Remove newtype for qualifs in rustc_metadata

    We have a proper type for these now, so the wrapper is no longer
    necessary.
    ecstatic-morse committed Nov 15, 2019
    Configuration menu
    Copy the full SHA
    a1135cc View commit details
    Browse the repository at this point in the history