1. 02 10月, 2014 2 次提交
  2. 01 10月, 2014 3 次提交
  3. 27 9月, 2014 4 次提交
    • A
      complete btree rewrite · b6edc594
      Alexis Beingessner 提交于
      Replaces BTree with BTreeMap and BTreeSet, which are completely new implementations.
      BTreeMap's internal Node representation is particularly inefficient at the moment to
      make this first implementation easy to reason about and fairly safe. Both collections
      are also currently missing some of the tooling specific to sorted collections, which
      is planned as future work pending reform of these APIs. General implementation issues
      are discussed with TODOs internally
      
      Perf results on x86_64 Linux:
      
      test treemap::bench::find_rand_100                         ... bench:        76 ns/iter (+/- 4)
      test treemap::bench::find_rand_10_000                      ... bench:       163 ns/iter (+/- 6)
      test treemap::bench::find_seq_100                          ... bench:        77 ns/iter (+/- 3)
      test treemap::bench::find_seq_10_000                       ... bench:       115 ns/iter (+/- 1)
      test treemap::bench::insert_rand_100                       ... bench:       111 ns/iter (+/- 1)
      test treemap::bench::insert_rand_10_000                    ... bench:       996 ns/iter (+/- 18)
      test treemap::bench::insert_seq_100                        ... bench:       486 ns/iter (+/- 20)
      test treemap::bench::insert_seq_10_000                     ... bench:       800 ns/iter (+/- 15)
      
      test btree::map::bench::find_rand_100                      ... bench:        74 ns/iter (+/- 4)
      test btree::map::bench::find_rand_10_000                   ... bench:       153 ns/iter (+/- 5)
      test btree::map::bench::find_seq_100                       ... bench:        82 ns/iter (+/- 1)
      test btree::map::bench::find_seq_10_000                    ... bench:       108 ns/iter (+/- 0)
      test btree::map::bench::insert_rand_100                    ... bench:       220 ns/iter (+/- 1)
      test btree::map::bench::insert_rand_10_000                 ... bench:       620 ns/iter (+/- 16)
      test btree::map::bench::insert_seq_100                     ... bench:       411 ns/iter (+/- 12)
      test btree::map::bench::insert_seq_10_000                  ... bench:       534 ns/iter (+/- 14)
      
      BTreeMap still has a lot of room for optimization, but it's already beating out TreeMap on most access patterns.
      
      [breaking-change]
      b6edc594
    • K
      Rename raw::Box to raw::GcBox · f8a180b3
      Keegan McAllister 提交于
      Fixes #17470.
      f8a180b3
    • P
      librustc: Give trait methods accessible via fewer autoderefs priority · 21df9c80
      Patrick Walton 提交于
      over inherent methods accessible via more autoderefs.
      
      This simplifies the trait matching algorithm. It breaks code like:
      
          impl Foo {
              fn foo(self) {
                  // before this change, this will be called
              }
          }
      
          impl<'a,'b,'c> Trait for &'a &'b &'c Foo {
              fn foo(self) {
                  // after this change, this will be called
              }
          }
      
          fn main() {
              let x = &(&(&Foo));
              x.foo();
          }
      
      To explicitly indicate that you wish to call the inherent method, perform
      explicit dereferences. For example:
      
          fn main() {
              let x = &(&(&Foo));
              (***x).foo();
          }
      
      Part of #17282.
      
      [breaking-change]
      21df9c80
    • B
      Disable runtime split stack support on Windows · a52eaaa9
      Brian Anderson 提交于
      a52eaaa9
  4. 26 9月, 2014 2 次提交
  5. 25 9月, 2014 2 次提交
    • A
      implement entry API for HashMap · 8e58f308
      Alexis Beingessner 提交于
      Deprecates the `find_or_*` family of "internal mutation" methods on `HashMap` in
      favour of the "external mutation" Entry API as part of RFC 60. Part of #17320,
      although this still needs to be done on the rest of the maps, they don't have
      any internal mutation methods defined, so they can be done without deprecating
      or breaking anything. Work on `BTree`'s is part of the complete rewrite in #17334.
      
      The implemented API deviates from the API described in the RFC in two key places:
      
      * `VacantEntry.set` yields a mutable reference to the inserted element to avoid code
      duplication where complex logic needs to be done *regardless* of whether the entry
      was vacant or not.
      * `OccupiedEntry.into_mut` was added so that it is possible to return a reference
      into the map beyond the lifetime of the Entry itself, providing functional parity
      to `VacantEntry.set`.
      
      This allows the full find_or_insert functionality to be implemented using this API.
      A PR will be submitted to the RFC to amend this.
      
      [breaking-change]
      8e58f308
    • P
      Fix free lifetime vars in HashMap's iterators · 0a10b9dc
      Piotr Czarnecki 提交于
      0a10b9dc
  6. 24 9月, 2014 2 次提交
  7. 23 9月, 2014 1 次提交
  8. 22 9月, 2014 4 次提交
  9. 20 9月, 2014 1 次提交
    • A
      std: Don't require bitflags! be u32 · b54eb9b6
      Alex Crichton 提交于
      If you didn't have a trailing comma at the end of the variants, you could use
      any type you wanted, but if you used a trailing comma the macro would
      erroneously require the bits be a u32.
      b54eb9b6
  10. 19 9月, 2014 1 次提交
    • N
      Add enum variants to the type namespace · ce0907e4
      Nick Cameron 提交于
      Change to resolve and update compiler and libs for uses.
      
      [breaking-change]
      
      Enum variants are now in both the value and type namespaces. This means that
      if you have a variant with the same name as a type in scope in a module, you
      will get a name clash and thus an error. The solution is to either rename the
      type or the variant.
      ce0907e4
  11. 18 9月, 2014 3 次提交
  12. 17 9月, 2014 5 次提交
  13. 16 9月, 2014 1 次提交
  14. 15 9月, 2014 1 次提交
  15. 13 9月, 2014 1 次提交
    • P
      librustc: Forbid inherent implementations that aren't adjacent to the · 467bea04
      Patrick Walton 提交于
      type they provide an implementation for.
      
      This breaks code like:
      
          mod foo {
              struct Foo { ... }
          }
      
          impl foo::Foo {
              ...
          }
      
      Change this code to:
      
          mod foo {
              struct Foo { ... }
      
              impl Foo {
                  ...
              }
          }
      
      Additionally, if you used the I/O path extension methods `stat`,
      `lstat`, `exists`, `is_file`, or `is_dir`, note that these methods have
      been moved to the the `std::io::fs::PathExtensions` trait. This breaks
      code like:
      
          fn is_it_there() -> bool {
              Path::new("/foo/bar/baz").exists()
          }
      
      Change this code to:
      
          use std::io::fs::PathExtensions;
      
          fn is_it_there() -> bool {
              Path::new("/foo/bar/baz").exists()
          }
      
      Closes #17059.
      
      RFC #155.
      
      [breaking-change]
      467bea04
  16. 09 9月, 2014 1 次提交
    • A
      std: Turn down the stdout chunk size · 198030fa
      Alex Crichton 提交于
      I've found that 64k is still too much and continue to see the errors as reported
      in #14940. I've locally found that 32k fails, and 24k succeeds, so I've trimmed
      the size down to 8192 which libuv happens to use as well.
      
      It sounds like the limit can still be hit with many threads in play, but I have
      yet to reproduce this, so I figure we can wait until that's hit (if it's
      possible) and then take action.
      198030fa
  17. 07 9月, 2014 1 次提交
  18. 05 9月, 2014 5 次提交