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

Rollup of 16 pull requests #58668

Closed
wants to merge 64 commits into from
Closed

Rollup of 16 pull requests #58668

wants to merge 64 commits into from

Commits on Feb 3, 2019

  1. RangeInclusive internal iteration performance improvement.

    Specialize Iterator::try_fold and DoubleEndedIterator::try_rfold to
    improve code generation in all internal iteration scenarios.
    
    This changes brings the performance of internal iteration with
    RangeInclusive on par with the performance of iteration with Range:
    
     - Single conditional jump in hot loop,
     - Unrolling and vectorization,
     - And even Closed Form substitution.
    
    Unfortunately, it only applies to internal iteration. Despite various
    attempts at stream-lining the implementation of next and next_back,
    LLVM has stubbornly refused to optimize external iteration
    appropriately, leaving me with a choice between:
    
     - The current implementation, for which Closed Form substitution is
       performed, but which uses 2 conditional jumps in the hot loop when
       optimization fail.
     - An implementation using a "is_done" boolean, which uses 1
       conditional jump in the hot loop when optimization fail, allowing
       unrolling and vectorization, but for which Closed Form substitution
       fails.
    
    In the absence of any conclusive evidence as to which usecase matters
    most, and with no assurance that the lack of Closed Form substitution
    is not indicative of other optimizations being foiled, there is no way
    to pick one implementation over the other, and thus I defer to the
    statu quo as far as next and next_back are concerned.
    matthieu-m committed Feb 3, 2019
    Configuration menu
    Copy the full SHA
    eb5b096 View commit details
    Browse the repository at this point in the history

Commits on Feb 5, 2019

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

Commits on Feb 6, 2019

  1. Updated RELEASES.md for 1.33.0

    Aaron Power committed Feb 6, 2019
    Configuration menu
    Copy the full SHA
    50be479 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d4c52bf View commit details
    Browse the repository at this point in the history

Commits on Feb 7, 2019

  1. Update RELEASES.md

    Aaronepower committed Feb 7, 2019
    Configuration menu
    Copy the full SHA
    6c71e7d View commit details
    Browse the repository at this point in the history

Commits on Feb 9, 2019

  1. Update RELEASES.md

    Co-Authored-By: Aaronepower <Aaronepower@users.noreply.github.com>
    mark-i-m and Aaronepower committed Feb 9, 2019
    Configuration menu
    Copy the full SHA
    fb3ae57 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4fed67f View commit details
    Browse the repository at this point in the history

Commits on Feb 12, 2019

  1. Update RELEASES.md

    Co-Authored-By: Aaronepower <Aaronepower@users.noreply.github.com>
    Centril and Aaronepower committed Feb 12, 2019
    Configuration menu
    Copy the full SHA
    73921f6 View commit details
    Browse the repository at this point in the history
  2. Update RELEASES.md

    Co-Authored-By: Aaronepower <Aaronepower@users.noreply.github.com>
    Centril and Aaronepower committed Feb 12, 2019
    Configuration menu
    Copy the full SHA
    8a026f1 View commit details
    Browse the repository at this point in the history
  3. Update RELEASES.md

    Co-Authored-By: Aaronepower <Aaronepower@users.noreply.github.com>
    Centril and Aaronepower committed Feb 12, 2019
    Configuration menu
    Copy the full SHA
    4c0a3d5 View commit details
    Browse the repository at this point in the history
  4. Update RELEASES.md

    Co-Authored-By: Aaronepower <Aaronepower@users.noreply.github.com>
    Centril and Aaronepower committed Feb 12, 2019
    Configuration menu
    Copy the full SHA
    ee3371e View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2019

  1. Configuration menu
    Copy the full SHA
    4e5eda3 View commit details
    Browse the repository at this point in the history
  2. Update RELEASES.md

    Co-Authored-By: Aaronepower <Aaronepower@users.noreply.github.com>
    Centril and Aaronepower committed Feb 13, 2019
    Configuration menu
    Copy the full SHA
    a496450 View commit details
    Browse the repository at this point in the history
  3. check if used_place and moved_place are equal when determining if…

    … the move was partial
    clintfred committed Feb 13, 2019
    Configuration menu
    Copy the full SHA
    96fd218 View commit details
    Browse the repository at this point in the history
  4. simplified conditional

    clintfred committed Feb 13, 2019
    Configuration menu
    Copy the full SHA
    755b320 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    283ffcf View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2019

  1. SGX target: fix panic = abort

    Jethro Beekman committed Feb 14, 2019
    Configuration menu
    Copy the full SHA
    347a42e View commit details
    Browse the repository at this point in the history

Commits on Feb 17, 2019

  1. Configuration menu
    Copy the full SHA
    c34aac7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    71cd4c8 View commit details
    Browse the repository at this point in the history
  3. Change Token::interpolated_to_tokenstream().

    It is currently a method of `Token`, but it only is valid to call if
    `self` is a `Token::Interpolated`. This commit eliminates the
    possibility of misuse by changing it to an associated function that
    takes a `Nonterminal`, which also simplifies the call sites.
    
    This requires splitting out a new function, `nonterminal_to_string`.
    nnethercote committed Feb 17, 2019
    Configuration menu
    Copy the full SHA
    d26bf74 View commit details
    Browse the repository at this point in the history
  4. Remove LazyTokenStream.

    It's present within `Token::Interpolated` as an optimization, so that if
    a nonterminal is converted to a `TokenStream` multiple times, the
    first-computed value is saved and reused.
    
    But in practice it's not needed. `interpolated_to_tokenstream()` is a
    cold function: it's only called a few dozen times while compiling rustc
    itself, and a few hundred times across the entire `rustc-perf` suite.
    Furthermore, when it is called, it is almost always the first
    conversion, so no benefit is gained from it.
    
    So this commit removes `LazyTokenStream`, along with the now-unnecessary
    `Token::interpolated()`.
    
    As well as a significant simplification, the removal speeds things up
    slightly, mostly due to not having to `drop` the `LazyTokenStream`
    instances.
    nnethercote committed Feb 17, 2019
    Configuration menu
    Copy the full SHA
    f8801f3 View commit details
    Browse the repository at this point in the history
  5. Avoid a clone() in transcribe().

    The current code (expensively) clones the value within an `Rc`. This
    commit changes things so that the `Rc` itself is (cheaply) cloned
    instead, avoid some allocations.
    
    This requires converting a few `Rc` instances to `Lrc`.
    nnethercote committed Feb 17, 2019
    Configuration menu
    Copy the full SHA
    f0d8fbd View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    82ad4f1 View commit details
    Browse the repository at this point in the history
  7. Remove some unnecessary into() calls.

    These are probably leftovers from recent `TokenStream` simplifications.
    nnethercote committed Feb 17, 2019
    Configuration menu
    Copy the full SHA
    895a794 View commit details
    Browse the repository at this point in the history

Commits on Feb 18, 2019

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

Commits on Feb 20, 2019

  1. Turn duration consts into associated consts

    Stjepan Glavina committed Feb 20, 2019
    Configuration menu
    Copy the full SHA
    8e219e7 View commit details
    Browse the repository at this point in the history
  2. Update RELEASES.md

    Aaronepower committed Feb 20, 2019
    Configuration menu
    Copy the full SHA
    2621564 View commit details
    Browse the repository at this point in the history
  3. Update RELEASES.md

    Aaronepower committed Feb 20, 2019
    Configuration menu
    Copy the full SHA
    d072510 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    02fe6a7 View commit details
    Browse the repository at this point in the history
  5. Add examples for duration constants

    Stjepan Glavina committed Feb 20, 2019
    Configuration menu
    Copy the full SHA
    f223c03 View commit details
    Browse the repository at this point in the history
  6. Allow Self::Module to be mutated.

    `codegen_allocator` and `write_metadata` mutate the underlying LLVM module. As
    such, it makes sense for these two functions to receive a mutable reference to
    the module (as opposed to an immutable one).
    gabi-250 committed Feb 20, 2019
    Configuration menu
    Copy the full SHA
    36f18f2 View commit details
    Browse the repository at this point in the history
  7. Update RELEASES.md

    Co-Authored-By: Aaronepower <Aaronepower@users.noreply.github.com>
    tspiteri and Aaronepower committed Feb 20, 2019
    Configuration menu
    Copy the full SHA
    42d749c View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2019

  1. Enable feature duration_constants in examples

    Stjepan Glavina committed Feb 21, 2019
    Configuration menu
    Copy the full SHA
    c6d24cd View commit details
    Browse the repository at this point in the history
  2. Update RELEASES.md

    Aaronepower committed Feb 21, 2019
    Configuration menu
    Copy the full SHA
    8060eb4 View commit details
    Browse the repository at this point in the history
  3. Update RELEASES.md

    Aaronepower committed Feb 21, 2019
    Configuration menu
    Copy the full SHA
    0ab2aed View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e5d1fa5 View commit details
    Browse the repository at this point in the history
  5. Optimise vec![false; N] to zero-alloc

    Nowadays booleans have a well-defined representation, so there is no reason not to optimise their allocation.
    RReverser committed Feb 21, 2019
    Configuration menu
    Copy the full SHA
    9f58c5f View commit details
    Browse the repository at this point in the history

Commits on Feb 22, 2019

  1. Configuration menu
    Copy the full SHA
    bba0ea2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b5ae4d5 View commit details
    Browse the repository at this point in the history
  3. Make target pointer-width specific variants of (very old) huge-array-…

    …simple.rs test.
    
    (and now unignore the test since it shouldn't break tests of
    cross-compiles anymore.)
    pnkfelix committed Feb 22, 2019
    Configuration menu
    Copy the full SHA
    e555854 View commit details
    Browse the repository at this point in the history
  4. Switch from error patterns to //~ ERROR markers.

    AFAICT, we do not have the same const-eval issues that we used to when
    rust-lang#23926 was filed. (Probably because of the switch to
    miri for const-evaluation.)
    pnkfelix committed Feb 22, 2019
    Configuration menu
    Copy the full SHA
    b72ba05 View commit details
    Browse the repository at this point in the history
  5. Update RELEASES.md

    Centril committed Feb 22, 2019
    Configuration menu
    Copy the full SHA
    fda51c2 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    cc1cd83 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    5f27a25 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    8ee1c07 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    5952c61 View commit details
    Browse the repository at this point in the history

Commits on Feb 23, 2019

  1. Configuration menu
    Copy the full SHA
    d0c110f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    42d5cf8 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#58122 - matthieu-m:range_incl_perf, r=dtolnay

    RangeInclusive internal iteration performance improvement.
    
    Specialize `Iterator::try_fold` and `DoubleEndedIterator::try_rfold` to improve code generation in all internal iteration scenarios.
    
    This changes brings the performance of internal iteration with `RangeInclusive` on par with the performance of iteration with `Range`:
    
     - Single conditional jump in hot loop,
     - Unrolling and vectorization,
     - And even Closed Form substitution.
    
    Unfortunately, it only applies to internal iteration. Despite various attempts at stream-lining the implementation of `next` and `next_back`, LLVM has stubbornly refused to optimize external iteration appropriately, leaving me with a choice between:
    
     - The current implementation, for which Closed Form substitution is performed, but which uses 2 conditional jumps in the hot loop when optimization fail.
     - An implementation using a `is_done` boolean, which uses 1 conditional jump in the hot loop when optimization fail, allowing unrolling and vectorization, but for which Closed Form substitution fails.
    
    In the absence of any conclusive evidence as to which usecase matters most, and with no assurance that the lack of Closed Form substitution is not indicative of other optimizations being foiled, there is no way
    to pick one implementation over the other, and thus I defer to the statu quo as far as `next` and `next_back` are concerned.
    Centril committed Feb 23, 2019
    Configuration menu
    Copy the full SHA
    86d8b05 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#58199 - clintfred:partial-move-err-msg, r=e…

    …stebank
    
    Add better error message for partial move
    
    closes rust-lang#56657
    
    r? @davidtwco
    Centril committed Feb 23, 2019
    Configuration menu
    Copy the full SHA
    55d428a View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#58227 - Aaronepower:master, r=Centril

    Updated RELEASES.md for 1.33.0
    
    [Rendered](https://github.com/Aaronepower/rust/blob/master/RELEASES.md)
    
    r? @Mark-Simulacrum
    
    cc @rust-lang/release
    Centril committed Feb 23, 2019
    Configuration menu
    Copy the full SHA
    7c226e4 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#58353 - matthewjasper:typeck-pattern-consta…

    …nts, r=arielb1
    
    Check the Self-type of inherent associated constants
    
    r? @arielb1
    Centril committed Feb 23, 2019
    Configuration menu
    Copy the full SHA
    e855b05 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#58453 - jethrogb:jb/sgx-panic-abort, r=nagisa

    SGX target: fix panic = abort
    
    What is the difference between `no_mangle` and `rustc_std_internal_symbol`?
    Centril committed Feb 23, 2019
    Configuration menu
    Copy the full SHA
    4fc275d View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#58476 - nnethercote:rm-LazyTokenStream, r=p…

    …etrochenkov
    
    Remove `LazyTokenStream`.
    
    `LazyTokenStream` was added in rust-lang#40939. Perhaps it was an effective optimization then, but no longer. This PR removes it, making the code both simpler and faster.
    
    r? @alexcrichton
    Centril committed Feb 23, 2019
    Configuration menu
    Copy the full SHA
    c8ade46 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#58526 - pmccarter:master, r=estebank

    Special suggestion for illegal unicode curly quote pairs
    
    Fixes rust-lang#58436
    
    Did not end up expanding the error message span to include the full string literal since I figured the start of the token was the issue, while the help suggestion span would include up to the closing quotation mark.
    
    The look ahead logic does not affect the reader position, not sure if that is an issue (if eg it should still continue to parse after the closing quote without erroring out).
    Centril committed Feb 23, 2019
    Configuration menu
    Copy the full SHA
    d6c330d View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#58595 - stjepang:make-duration-consts-assoc…

    …iated, r=oli-obk
    
    Turn duration consts into associated consts
    
    As suggested in rust-lang#57391 (comment), I'm moving `Duration` constants (`SECOND`, `MILLISECOND` and so on; currently behind unstable `duration_constants` feature) into the `impl Duration` block.
    
    cc @frewsxcv @SimonSapin
    Centril committed Feb 23, 2019
    Configuration menu
    Copy the full SHA
    c0275c2 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#58609 - gabi-250:mutable-refs, r=oli-obk

    Allow Self::Module to be mutated.
    
    This only changes `&Self::Module` to `&mut Self::Module` in a couple of places.
    
    `codegen_allocator` and `write_metadata` from `ExtraBackendMethods` mutate the underlying LLVM module. As such, it makes sense for these two functions to receive a mutable reference to the module (as opposed to an immutable one).
    
    I am trying to implement `codegen_allocator` for my backend, and I need to be able to mutate `Self::Module`:
    https://github.com/rust-lang/rust/blob/f66e4697ae286985ddefc53c3a047614568458bb/src/librustc_codegen_ssa/traits/backend.rs#L41
    Modifying the module in `codegen_allocator`/`write_metadata` is not a problem for the LLVM backend, because [ModuleLlvm](https://github.com/rust-lang/rust/blob/master/src/librustc_codegen_llvm/lib.rs#L357) contains a raw pointer to the underlying LLVM module, so it can easily be mutated through FFI calls.
    
    I am trying to avoid interior mutability and `unsafe` as much as I can. What do you think? Does this change make sense, or is there a reason why this should stay the way it is?
    Centril committed Feb 23, 2019
    Configuration menu
    Copy the full SHA
    8829866 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#58628 - RReverser:optimise-vec-false, r=oli…

    …-obk
    
    Optimise vec![false; N] to zero-alloc
    
    Nowadays booleans have a well-defined representation, so there is no reason not to optimise their allocation.
    Centril committed Feb 23, 2019
    Configuration menu
    Copy the full SHA
    2841c45 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#58642 - tspiteri:intra-rustdoc-prim-method,…

    … r=GuillaumeGomez
    
    rustdoc: support methods on primitives in intra-doc links
    
    Fixes rust-lang#58598.
    Centril committed Feb 23, 2019
    Configuration menu
    Copy the full SHA
    dda418c View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#58643 - GuillaumeGomez:extra-variables, r=M…

    …anishearth
    
    Don't generate minification variables if minification disabled
    
    If the minification is disabled, there is no sense having those variables.
    
    r? @QuietMisdreavus
    Centril committed Feb 23, 2019
    Configuration menu
    Copy the full SHA
    9c99d3e View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#58648 - pnkfelix:issue-23926-update-tests, …

    …r=nikomatsakis
    
    Update tests to account for cross-platform testing and miri.
    
    Fix rust-lang#23926
    Centril committed Feb 23, 2019
    Configuration menu
    Copy the full SHA
    3de7aaf View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#58654 - estebank:underflow, r=nikomatsakis

    Do not underflow after resetting unmatched braces count
    
    Fix rust-lang#58638.
    
    r? @oli-obk
    Centril committed Feb 23, 2019
    Configuration menu
    Copy the full SHA
    34d43fc View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#58658 - pmccarter:align_msg, r=matthewjasper

    Add expected/provided byte alignments to validation error message
    
    Fixes rust-lang#58617
    Centril committed Feb 23, 2019
    Configuration menu
    Copy the full SHA
    6fa3116 View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#58667 - kenta7777:reduce-mir-code-repetitio…

    …n, r=petrochenkov
    
    Reduce Miri-related Code Repetition `like (n << amt) >> amt`
    
    This Pull Request fixes a part of [rust-lang#49937](rust-lang#49937).
    Centril committed Feb 23, 2019
    Configuration menu
    Copy the full SHA
    6f374ea View commit details
    Browse the repository at this point in the history