Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Jun 20, 2015
  1. @nham

    Add a regression test for issue #18809.

    nham authored
    Closes #18809.
  2. @bors

    Auto merge of #26411 - dotdash:fat_in_registers, r=aatch

    bors authored
    
    This has a number of advantages compared to creating a copy in memory
    and passing a pointer. The obvious one is that we don't have to put the
    data into memory but can keep it in registers. Since we're currently
    passing a pointer anyway (instead of using e.g. a known offset on the
    stack, which is what the `byval` attribute would achieve), we only use a
    single additional register for each fat pointer, but save at least two
    pointers worth of stack in exchange (sometimes more because more than
    one copy gets eliminated). On archs that pass arguments on the stack, we
    save a pointer worth of stack even without considering the omitted
    copies.
    
    Additionally, LLVM can optimize the code a lot better, to a large degree
    due to the fact that lots of copies are gone or can be optimized away.
    Additionally, we can now emit attributes like nonnull on the data and/or
    vtable pointers contained in the fat pointer, potentially allowing for
    even more optimizations.
    
    This results in LLVM passes being about 3-7% faster (depending on the
    crate), and the resulting code is also a few percent smaller, for
    example:
    
    |text|data|filename|
    |----|----|--------|
    |5671479|3941461|before/librustc-d8ace771.so|
    |5447663|3905745|after/librustc-d8ace771.so|
    | | | |
    |1944425|2394024|before/libstd-d8ace771.so|
    |1896769|2387610|after/libstd-d8ace771.so|
    
    I had to remove a call in the backtrace-debuginfo test, because LLVM can
    now merge the tails of some blocks when optimizations are turned on,
    which can't correctly preserve line info.
    
    Fixes #22924
    
    Cc #22891 (at least for fat pointers the code is good now)
  3. @dotdash

    Pass fat pointers in two immediate arguments

    dotdash authored
    This has a number of advantages compared to creating a copy in memory
    and passing a pointer. The obvious one is that we don't have to put the
    data into memory but can keep it in registers. Since we're currently
    passing a pointer anyway (instead of using e.g. a known offset on the
    stack, which is what the `byval` attribute would achieve), we only use a
    single additional register for each fat pointer, but save at least two
    pointers worth of stack in exchange (sometimes more because more than
    one copy gets eliminated). On archs that pass arguments on the stack, we
    save a pointer worth of stack even without considering the omitted
    copies.
    
    Additionally, LLVM can optimize the code a lot better, to a large degree
    due to the fact that lots of copies are gone or can be optimized away.
    Additionally, we can now emit attributes like nonnull on the data and/or
    vtable pointers contained in the fat pointer, potentially allowing for
    even more optimizations.
    
    This results in LLVM passes being about 3-7% faster (depending on the
    crate), and the resulting code is also a few percent smaller, for
    example:
    
       text    data  filename
    5671479 3941461  before/librustc-d8ace771.so
    5447663 3905745  after/librustc-d8ace771.so
    
    1944425 2394024  before/libstd-d8ace771.so
    1896769 2387610  after/libstd-d8ace771.so
    
    I had to remove a call in the backtrace-debuginfo test, because LLVM can
    now merge the tails of some blocks when optimizations are turned on,
    which can't correctly preserve line info.
    
    Fixes #22924
    
    Cc #22891 (at least for fat pointers the code is good now)
  4. @Manishearth
  5. @Manishearth
  6. @bors
  7. @bors

    Auto merge of #26305 - Nashenas88:field-method-message-2392, r=eddyb

    bors authored
    This fixes #2392
    
    I'd like to thank @eddyb for helping me on this one! I wouldn't have gotten the complicated FnOnce check done without his help.
  8. @bors
  9. @nham

    Add a regression test for #18058.

    nham authored
    Fixes #18058.
  10. @stygstra
  11. @Nashenas88

    fixup! Finished implementing proper function check (through FnOnce) a…

    Nashenas88 authored
    …nd moved tests to new file and updated tests
  12. @Nashenas88

    Finished implementing proper function check (through FnOnce) and move…

    Nashenas88 authored
    …d tests to new file and updated tests
  13. @Nashenas88
  14. @Nashenas88

    Uncomplete fix for #2392

    Nashenas88 authored
Commits on Jun 19, 2015
  1. @bors

    Auto merge of #24527 - nikomatsakis:issue-24085, r=nikomatsakis

    bors authored
    Expand the "givens" set to cover transitive relations.  The givens array
    stores relationships like `'c <= '0` (where `'c` is a free region and
    `'0` is an inference variable) that are derived from closure
    arguments. These are (rather hackily) ignored for purposes of inference,
    preventing spurious errors. The current code did not handle transitive
    cases like `'c <= '0` and `'0 <= '1`. Fixes #24085.
    
    r? @pnkfelix 
    cc @bkoropoff
    
    *But* I am not sure whether this fix will have a compile-time hit. I'd like to push to try branch observe cycle times.
  2. @frewsxcv

    Add regression tests for #23649

    frewsxcv authored
    Closes #23649
  3. @bors

    Auto merge of #26351 - eddyb:tls-tcx, r=nikomatsakis

    bors authored
    Pre-requisite for splitting the type context into global and local parts.
    The `Repr` and `UserString` traits were also replaced by `Debug` and `Display`.
  4. @Munksgaard

    Add test for #24227

    Munksgaard authored
  5. @nikomatsakis

    Expand the "givens" set to cover transitive relations. The givens array

    nikomatsakis authored
    stores relationships like `'c <= '0` (where `'c` is a free region and
    `'0` is an inference variable) that are derived from closure
    arguments. These are (rather hackily) ignored for purposes of inference,
    preventing spurious errors. The current code did not handle transitive
    cases like `'c <= '0` and `'0 <= '1`. Fixes #24085.
  6. @arielb1

    address review comments

    arielb1 authored
  7. @Manishearth
Commits on Jun 18, 2015
  1. @eddyb
  2. @eddyb
  3. @eddyb
  4. @bors
  5. @arielb1

    Fix #23589

    arielb1 authored
  6. @arielb1

    Normalize associated types in closure signatures

    Ariel Ben-Yehuda authored arielb1 committed
    Fixes #25700.
  7. @bors

    Auto merge of #26192 - alexcrichton:features-clean, r=aturon

    bors authored
    This commit shards the all-encompassing `core`, `std_misc`, `collections`, and `alloc` features into finer-grained components that are much more easily opted into and tracked. This reflects the effort to push forward current unstable APIs to either stabilization or removal. Keeping track of unstable features on a much more fine-grained basis will enable the library subteam to quickly analyze a feature and help prioritize internally about what APIs should be stabilized.
    
    A few assorted APIs were deprecated along the way, but otherwise this change is just changing the feature name associated with each API. Soon we will have a dashboard for keeping track of all the unstable APIs in the standard library, and I'll also start making issues for each unstable API after performing a first-pass for stabilization.
  8. @arielb1

    Simplify and type_known_to_meet_builtin_bound and make it more correc…

    Ariel Ben-Yehuda authored arielb1 committed
    …t when
    
    associated types are involved.
  9. @alexcrichton

    Fix libstd tests

    alexcrichton authored
  10. @bors

    Auto merge of #26385 - nham:fix_25396, r=alexcrichton

    bors authored
    Currently in the E0252 message, traits and modules are all called types (as in "a type named `Foo` has already been imported", even when `Foo` was a trait or module). This commit changes that to additionally detect when the import in question is a trait or module and report it accordingly.
    
    Fixes #25396.
  11. @arielb1

    Prohibit casts between fat pointers to different traits

    arielb1 authored
    This makes them compliant with the new version of RFC 401 (i.e.
        RFC 1052).
    
    Fixes #26391. I *hope* the tests I have are enough.
    
    This is a [breaking-change]
  12. @bors

    Auto merge of #26358 - nham:fix_24081, r=alexcrichton

    bors authored
    Previously, it said "import `Foo` conflicts with existing submodule" even
    when it was a type alias, enum, or trait. The message now says the conflict
    is with "type in this module" in the case of the first two, and "trait in
    this module" for the last one.
    
    Fixes #24081.
  13. @bors

    Auto merge of #26389 - Manishearth:rollup, r=Manishearth

    bors authored
    - Successful merges: #26314, #26342, #26348, #26349, #26369, #26387
    - Failed merges:
  14. @Manishearth
Something went wrong with that request. Please try again.