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

feature/spaceship: Clause 22: Containers #1046

Merged

Commits on Jul 23, 2020

  1. Configuration menu
    Copy the full SHA
    732d748 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    06dfcd7 View commit details
    Browse the repository at this point in the history
  3. undid a change to iterator

    ahanamuk authored and StephanTLavavej committed Jul 23, 2020
    Configuration menu
    Copy the full SHA
    4ca3624 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    17e650d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c2ec451 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3ed745d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b7e83a4 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    fbc0f89 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    3c9a1a0 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    f6c5510 View commit details
    Browse the repository at this point in the history
  11. Fix queue/stack friendship.

    queue<T, NonSpaceshipContainer> might be instantiated for a
    non-three_way_comparable NonSpaceshipContainer. In that case, it
    shouldn't attempt to grant friendship to the spaceship operator,
    because that would attempt to form
    compare_three_way_result_t<NonSpaceshipContainer>.
    
    As far as I can tell, there's no way in the Core Language for a queue
    to grant friendship to only one specialization of its non-member
    spaceship operator while respecting the constraint. (See
    WG21-N4861 [temp.friend]/9.) Instead, we need to template the
    friendship declaration, such that queue grants friendship to all of its
    spaceship operators. This is safe, just verbose.
    StephanTLavavej committed Jul 23, 2020
    Configuration menu
    Copy the full SHA
    1dc5c43 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    f8ef466 View commit details
    Browse the repository at this point in the history

Commits on Jul 24, 2020

  1. Verify decltype(smaller <=> larger).

    We need a workaround until `std::pair` spaceship is implemented.
    
    Reorder `smaller <=> smaller_equal` for consistency with
    `smaller == smaller_equal` above.
    StephanTLavavej committed Jul 24, 2020
    Configuration menu
    Copy the full SHA
    dc3e324 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b2c5086 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0cfe696 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c9699e7 View commit details
    Browse the repository at this point in the history
  5. Move vector swap/comparison below vector<bool>.

    This avoids anything potentially instantiating them before the
    partial specialization vector<bool, Alloc> has been declared.
    StephanTLavavej committed Jul 24, 2020
    Configuration menu
    Copy the full SHA
    7538c77 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    8858a09 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    1416165 View commit details
    Browse the repository at this point in the history

Commits on Jul 25, 2020

  1. Configuration menu
    Copy the full SHA
    015eae3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cd9a610 View commit details
    Browse the repository at this point in the history
  3. Use _Countr_zero() for even more efficiency.

    Co-authored-by: Casey Carter <Casey@Carter.net>
    StephanTLavavej and CaseyCarter committed Jul 25, 2020
    Configuration menu
    Copy the full SHA
    9fd5169 View commit details
    Browse the repository at this point in the history
  4. Further improve _Vbase_compare_three_way codegen.

    Testing `_Differing_bits == 0` might seem like it's asking the compiler
    to do more work (always XORing). But it allows the compiler to see that
    the input to `_Countr_zero` is nonzero, and that allows it to optimize
    away the runtime ISA check, unconditionally emitting a `tzcnt`
    instruction.
    
    Then, at the end of the function, we know something that the compiler
    doesn't realize: `_Mask` selects a differing bit (the least significant
    one), so `(_Left & _Mask)` and `(_Right & _Mask)` are zero/nonzero
    or vice versa. Therefore, we only need to inspect one side!
    
    I've verified that each of these changes improves the codegen.
    
    Co-authored-by: Casey Carter <Casey@Carter.net>
    StephanTLavavej and CaseyCarter committed Jul 25, 2020
    Configuration menu
    Copy the full SHA
    195536b View commit details
    Browse the repository at this point in the history

Commits on Jul 28, 2020

  1. Configuration menu
    Copy the full SHA
    664ac1b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d6acf3e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2059df3 View commit details
    Browse the repository at this point in the history
  4. Improve comments.

    StephanTLavavej committed Jul 28, 2020
    Configuration menu
    Copy the full SHA
    0355938 View commit details
    Browse the repository at this point in the history
  5. Clarify comment.

    StephanTLavavej committed Jul 28, 2020
    Configuration menu
    Copy the full SHA
    e372f73 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f906d04 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3ec3965 View commit details
    Browse the repository at this point in the history