1. 01 10月, 2013 1 次提交
  2. 29 9月, 2013 3 次提交
  3. 28 9月, 2013 24 次提交
  4. 27 9月, 2013 12 次提交
    • B
      auto merge of #9550 : alexcrichton/rust/remove-printf, r=thestinger · 10e7f12d
      bors 提交于
      The 0.8 release was cut, down with printf!
      10e7f12d
    • B
      auto merge of #9548 : thestinger/rust/internal, r=alexcrichton · 01313a13
      bors 提交于
      Closes #9494
      01313a13
    • B
      auto merge of #9540 : alexcrichton/rust/more-rustdoc-improvements, r=brson · 74dfd93b
      bors 提交于
      Commit messages have the details, mostly just knocking out more low-hanging-fruit type issues.
      74dfd93b
    • B
      auto merge of #9538 : thestinger/rust/type_use, r=pcwalton · ae8a2ff3
      bors 提交于
      This is broken, and results in poor performance due to the undefined
      behaviour in the LLVM IR. LLVM's `mergefunc` is a *much* better way of
      doing this since it merges based on the equality of the bytecode.
      
      For example, consider `std::repr`. It generates different code per
      type, but is not included in the type bounds of generics.
      
      The `mergefunc` pass works for most of our code but currently hits an
      assert on libstd. It is receiving attention upstream so it will be
      ready soon, but I don't think removing this broken code should wait any
      longer. I've opened #9536 about enabling it by default.
      
      Closes #8651
      Closes #3547
      Closes #2537
      Closes #6971
      Closes #9222
      ae8a2ff3
    • B
      auto merge of #9527 : bmaxa/rust/master, r=alexcrichton · afbc242a
      bors 提交于
      that is, if super trait had more methods, tnen subtrait, compiling would fail. I simply forgot to update
      variable name. Updated test case , too.
      afbc242a
    • A
      Register new snapshots · 46aaf512
      Alex Crichton 提交于
      46aaf512
    • B
      auto merge of #9352 : erickt/rust/master, r=huonw · d6774f8c
      bors 提交于
      One of the downsides with `c_str` is that it always forces an allocation, and so this could add unnecessary overhead to various calls. This PR implements one of the suggestions @graydon made in #8296 for `vec.with_c_str` in that for a short string can use a small stack array instead of a malloced array for our temporary c string. This ends up being twice as fast for small strings.
      
      There are two things to consider before landing this commit though. First off, I arbitrarily picked the stack array as 32 bytes, and I'm not sure if this a reasonable amount or not. Second, there is a risk that someone can keep a reference to the interior stack pointer, which could cause mayhem if someone were to dereference the pointer. Since we also can easily grab and return interior pointers to vecs though, I don't think this is that much of an issue.
      d6774f8c
    • E
      std: simplify vec.with_c_str · b1ee87f4
      Erick Tryzelaar 提交于
      This also fixes a bug in `vec.with_c_str_unchecked` where we
      were not calling `.to_c_str_unchecked()` for long strings.
      b1ee87f4
    • E
      std: add micro optimization to vec.with_c_str_unchecked · 2d878033
      Erick Tryzelaar 提交于
      before:
      
      test c_str::bench::bench_with_c_str_unchecked_long ... bench: 361 ns/iter (+/- 9)
      test c_str::bench::bench_with_c_str_unchecked_medium ... bench: 75 ns/iter (+/- 2)
      test c_str::bench::bench_with_c_str_unchecked_short ... bench: 60 ns/iter (+/- 9)
      
      after:
      
      test c_str::bench::bench_with_c_str_unchecked_long ... bench: 362 ns/iter (+/-
      test c_str::bench::bench_with_c_str_unchecked_medium ... bench: 30 ns/iter (+/- 7)
      test c_str::bench::bench_with_c_str_unchecked_short ... bench: 12 ns/iter (+/- 4)
      2d878033
    • E
      std: Up vec.with_c_str's stack buffer to 128 · 4868273d
      Erick Tryzelaar 提交于
      This matches @graydon's recommendation.
      4868273d
    • E
      std: Remove an unnecessary comment from c_str · ca66b812
      Erick Tryzelaar 提交于
      The documentation for `.with_c_str()` already says that the pointer
      will be deallocated before returning from the function.
      ca66b812
    • E
      std: Micro-optimize vec.with_c_str for short vectors · e02d1eb1
      Erick Tryzelaar 提交于
      This now makes it unsafe to save the pointer returned by .with_c_str
      as that pointer now may be pointing at a stack allocated array.
      
      I arbitrarily chose 32 bytes as the length of the stack vector, and
      so it might not be the most optimal size.
      
      before:
      
      test c_str::bench::bench_with_c_str_long ... bench: 539 ns/iter (+/- 91)
      test c_str::bench::bench_with_c_str_medium ... bench: 97 ns/iter (+/- 2)
      test c_str::bench::bench_with_c_str_short ... bench: 70 ns/iter (+/- 5)
      
      after:
      
      test c_str::bench::bench_with_c_str_long ... bench: 542 ns/iter (+/- 13)
      test c_str::bench::bench_with_c_str_medium ... bench: 53 ns/iter (+/- 6)
      test c_str::bench::bench_with_c_str_short ... bench: 19 ns/iter (+/- 0)
      e02d1eb1