1. 24 6月, 2014 9 次提交
  2. 23 6月, 2014 14 次提交
  3. 22 6月, 2014 17 次提交
    • B
      auto merge of #15088 : Sawyer47/rust/detotal, r=alexcrichton · c9f3c689
      bors 提交于
      There were still Total{Ord,Eq} in docs and src/etc
      c9f3c689
    • N
      Rename ty_param_bounds_and_ty to Polytype · 8a4bb8a5
      Niko Matsakis 提交于
      8a4bb8a5
    • N
      Rename and move ty_param_substs_and_ty · 7ead6bed
      Niko Matsakis 提交于
      7ead6bed
    • P
      Remove duplicated test files · 37b8ce00
      Piotr Jawniak 提交于
      Even if they used to test different things in the past, they are
      now identical to other files.
      
      Closes #11496
      37b8ce00
    • P
      Update few files after comparison traits renaming · 0b9e4fca
      Piotr Jawniak 提交于
      There were still Total{Ord,Eq} in docs and src/etc
      0b9e4fca
    • F
      RegionFolder should only invoke callback on free regions. · 36caa7a7
      Felix S. Klock II 提交于
      In other words, Late-bound regions that occur non-free should be
      skipped.
      
      Fix #10846.
      36caa7a7
    • B
      auto merge of #15005 : dotdash/rust/i1_bool, r=alexcrichton · 4c39962d
      bors 提交于
      We currently compiled bools to i8 values, because there was a bug in
      LLVM that sometimes caused miscompilations when using i1 in, for
      example, structs.
      
      Using i8 means a lot of unnecessary zero-extend and truncate operations
      though, since we have to convert the value from and to i1 when using for
      example icmp or br instructions. Besides the unnecessary overhead caused
      by this, it also sometimes made LLVM miss some optimizations.
      
      First, we have to fix some bugs concerning the handling of
      attributes in foreign function declarations and calls. These
      are required because the i1 type needs the ZExt attribute when
      used as a function parameter or return type.
      
      Then we have to update LLVM to get a bugfix without which LLVM
      sometimes generates broken code when using i1.
      
      And then, finally, we can switch bools over to i1.
      4c39962d
    • J
    • E
      b9aeda48
    • E
      std: inline many of the Writer/Reader methods · 0f39dc7b
      Erick Tryzelaar 提交于
      This allows llvm to optimize away much of the overhead from using
      the MemReader/MemWriters. My benchmarks showed it to shave 15% off
      of my in progress serialization/json encoding.
      0f39dc7b
    • E
      serialize: Simplify the json docs · 76371d1f
      Erick Tryzelaar 提交于
      76371d1f
    • E
      std: micro-optimize Vec constructors and add benchmarks · b0fb520f
      Erick Tryzelaar 提交于
      Generally speaking, inlining doesn't really help out with
      constructing vectors, except for when we construct a zero-sized
      vector. This patch allows llvm to optimize this case away in
      a lot of cases, which shaves off 4-8ns. It's not much, but it
      might help in some inner loop somewhere.
      
      before:
      
      running 12 tests
      test bench_extend_0          ... bench:       123 ns/iter (+/- 6)
      test bench_extend_5          ... bench:       323 ns/iter (+/- 11)
      test bench_from_fn_0         ... bench:         7 ns/iter (+/- 0)
      test bench_from_fn_5         ... bench:        49 ns/iter (+/- 6)
      test bench_from_iter_0       ... bench:        11 ns/iter (+/- 0)
      test bench_from_iter_5       ... bench:       176 ns/iter (+/- 11)
      test bench_from_slice_0      ... bench:         8 ns/iter (+/- 1)
      test bench_from_slice_5      ... bench:        73 ns/iter (+/- 5)
      test bench_new               ... bench:         0 ns/iter (+/- 0)
      test bench_with_capacity_0   ... bench:         6 ns/iter (+/- 1)
      test bench_with_capacity_100 ... bench:        41 ns/iter (+/- 3)
      test bench_with_capacity_5   ... bench:        40 ns/iter (+/- 2)
      
      after:
      
      test bench_extend_0          ... bench:       123 ns/iter (+/- 7)
      test bench_extend_5          ... bench:       339 ns/iter (+/- 27)
      test bench_from_fn_0         ... bench:         7 ns/iter (+/- 0)
      test bench_from_fn_5         ... bench:        54 ns/iter (+/- 4)
      test bench_from_iter_0       ... bench:        11 ns/iter (+/- 1)
      test bench_from_iter_5       ... bench:       182 ns/iter (+/- 16)
      test bench_from_slice_0      ... bench:         4 ns/iter (+/- 0)
      test bench_from_slice_5      ... bench:        62 ns/iter (+/- 3)
      test bench_new               ... bench:         0 ns/iter (+/- 0)
      test bench_with_capacity_0   ... bench:         0 ns/iter (+/- 0)
      test bench_with_capacity_100 ... bench:        41 ns/iter (+/- 1)
      test bench_with_capacity_5   ... bench:        41 ns/iter (+/- 3)
      b0fb520f
    • E
      Make destructuring trait reference work · f87bc6a5
      Edward Wang 提交于
      Closes #15031.
      f87bc6a5
    • J
      Fix a #14731 regression in missing_constructor() for vector patterns · d4da4ba4
      Jakub Wieczorek 提交于
      Fixes #15080.
      d4da4ba4
    • B
      Compile bools to i1 · d747de5a
      Björn Steinbrink 提交于
      We currently compiled bools to i8 values, because there was a bug in
      LLVM that sometimes caused miscompilations when using i1 in, for
      example, structs.
      
      Using i8 means a lot of unnecessary zero-extend and truncate operations
      though, since we have to convert the value from and to i1 when using for
      example icmp or br instructions. Besides the unnecessary overhead caused
      by this, it also sometimes made LLVM miss some optimizations.
      
      Fixes #8106.
      d747de5a
    • B
      Update LLVM · 90a9f65b
      Björn Steinbrink 提交于
      To fix #8106, we need an LLVM version that contains r211082 aka 0dee6756
      which fixes a bug that blocks that issue.
      
      There have been some tiny API changes in LLVM, and cmpxchg changed its
      return type. The i1 part of the new return type is only interesting when
      using the new weak cmpxchg, which we don't do.
      90a9f65b
    • B
      Add missing attributes to indirect calls for foreign functions · 5e720aac
      Björn Steinbrink 提交于
      When calling a foreign function, some arguments and/or return value
      attributes are required to conform to the foreign ABI. Currently those
      attributes are only added to the declaration of foreign functions. With
      direct calls, this is no problem, because LLVM can see that those
      attributes apply to the call. But with an indirect call, LLVM cannot do
      that and the attribute is missing.
      
      To fix that, we have to add those attribute to the calls to foreign
      functions as well.
      
      This also allows to remove the special handling of the SRet attribute,
      which is ABI-dependent and will be set via the `attr` field of the
      return type's `ArgType`.
      5e720aac