| Age | Commit message (Collapse) | Author | Lines |
|
This prevents unix sockets from remaining on the system all over the place, and
more closely mirrors the behavior of libuv and windows pipes.
|
|
|
|
|
|
Was killing performance of selector matching in Servo.
|
|
|
|
|
|
|
|
This commit removes the compiler support for floating point modulus operations,
as well as from the language. An implementation for this operator is now
required to be provided by libraries.
Floating point modulus is rarely used, doesn't exist in C, and is always lowered
to an fmod library call by LLVM, and LLVM is considering removing support
entirely.
Closes #12278
|
|
Fixed a typo in the documentation of std::mem, and refactored a function to use match instead of if.
Also added a FIXME to the benchmarks at the end of the file stating that they should be moved to another place, because they have nothing to do with `mem` (see https://github.com/mozilla/rust/issues/13642)
|
|
Fixed a typo in the documentation of std::mem, and refactored a function to use match instead of if.
Also added a FIXME to the benchmarks at the end of the file stating that they should be moved to another place, because they have nothing to do with `mem` (see https://github.com/mozilla/rust/issues/13642)
|
|
|
|
Ah, the wonders of not being gated on FreeBSD...
|
|
I was getting a bit confused by these and (I think) managed to track it down to fallout from #13448 and #13465.
|
|
|
|
Previously, symbols with rust escape sequences (denoted with dollar signs)
weren't demangled if the escape sequence showed up in the middle. This alters
the printing loop to look through the entire string for dollar characters.
|
|
We previously allocated 3x for every HashMap creation and resize. This patch reduces it to 1x.
|
|
This adds a `TcpStream::connect_timeout` function in order to assist opening
connections with a timeout (cc #13523). There isn't really much design space for
this specific operation (unlike timing out normal blocking reads/writes), so I
am fairly confident that this is the correct interface for this function.
The function is marked #[experimental] because it takes a u64 timeout argument,
and the u64 type is likely to change in the future.
|
|
On windows, correctly check for errors when spawning threads, and on both
windows and unix handle the error more gracefully rather than printing an opaque
assertion failure.
Closes #13589
|
|
|
|
|
|
Make all of the methods in `std::num::Float` take `self` and their other parameters by value.
Some of the `Float` methods took their parameters by value, and others took them by reference. This standardises them to one convention. The `Float` trait is intended for the built in IEEE 754 numbers only so we don't have to worry about the trait serving types of larger sizes.
[breaking-change]
|
|
Move the rounding functions into the `std::num::Float` trait and then remove `std::num::Round`.
This continues the flattening of the numeric traits tracked in #10387. The aim is to make `std::num` very simple and tied to the built in types, leaving the definition of more complex numeric towers to third-party libraries.
[breaking-change]
|
|
Previously, symbols with rust escape sequences (denoted with dollar signs)
weren't demangled if the escape sequence showed up in the middle. This alters
the printing loop to look through the entire string for dollar characters.
|
|
|
|
|
|
Ah, the wonders of not being gated on FreeBSD...
|
|
|
|
|
|
On windows, correctly check for errors when spawning threads, and on both
windows and unix handle the error more gracefully rather than printing an opaque
assertion failure.
Closes #13589
|
|
This removes all resizability support for ~[T] vectors in preparation of DST.
The only growable vector remaining is Vec<T>. In summary, the following methods
from ~[T] and various functions were removed. Each method/function has an
equivalent on the Vec type in std::vec unless otherwise stated.
* slice::OwnedCloneableVector
* slice::OwnedEqVector
* slice::append
* slice::append_one
* slice::build (no replacement)
* slice::bytes::push_bytes
* slice::from_elem
* slice::from_fn
* slice::with_capacity
* ~[T].capacity()
* ~[T].clear()
* ~[T].dedup()
* ~[T].extend()
* ~[T].grow()
* ~[T].grow_fn()
* ~[T].grow_set()
* ~[T].insert()
* ~[T].pop()
* ~[T].push()
* ~[T].push_all()
* ~[T].push_all_move()
* ~[T].remove()
* ~[T].reserve()
* ~[T].reserve_additional()
* ~[T].reserve_exect()
* ~[T].retain()
* ~[T].set_len()
* ~[T].shift()
* ~[T].shrink_to_fit()
* ~[T].swap_remove()
* ~[T].truncate()
* ~[T].unshift()
* ~str.clear()
* ~str.set_len()
* ~str.truncate()
Note that no other API changes were made. Existing apis that took or returned
~[T] continue to do so.
[breaking-change]
|
|
Title says it all.
|
|
This is the first snapshot build by mingw-w64 with the win32 threading model I believe (Closes #13501).
Curiously, this successfully built a snapshot on freebsd when the auto builder is continuously segfaulting. Who knew!
|
|
|
|
This adds some fairly extensive documentation for `Result`.
I'm using manual links to other rustdoc html pages a bit.
|
|
Some of this documentation got a little out of date. There was no mention of a
`SyncSender`, and the entire "Outside the runtime" section isn't really true any
more (or really all that relevant).
This also updates a few other doc blocks and adds some examples.
|
|
|
|
|
|
|
|
LLVM wasn't recognising the loops as memcpy loops and was therefore failing to optimise them properly. While improving LLVM is the "proper" way to fix this, I think that these cases are important enough to warrant a little low-level optimisation.
Fixes #13472
r? @thestinger
---
Benchmark Results:
```
--- Before ---
test clone_owned ... bench: 6126104 ns/iter (+/- 285962) = 170 MB/s
test clone_owned_to_owned ... bench: 6125054 ns/iter (+/- 271197) = 170 MB/s
test clone_str ... bench: 80586 ns/iter (+/- 11489) = 13011 MB/s
test clone_vec ... bench: 3903220 ns/iter (+/- 658556) = 268 MB/s
test test_memcpy ... bench: 69401 ns/iter (+/- 2168) = 15108 MB/s
--- After ---
test clone_owned ... bench: 70839 ns/iter (+/- 4931) = 14801 MB/s
test clone_owned_to_owned ... bench: 70286 ns/iter (+/- 4836) = 14918 MB/s
test clone_str ... bench: 78519 ns/iter (+/- 5511) = 13353 MB/s
test clone_vec ... bench: 71415 ns/iter (+/- 1999) = 14682 MB/s
test test_memcpy ... bench: 70980 ns/iter (+/- 2126) = 14772 MB/s
```
|
|
work started from @gereeter's PR: https://github.com/mozilla/rust/pull/13114
but adjusted bits
```
before
test hash::sip::tests::bench_u64 ... bench: 34 ns/iter (+/- 0)
test hash::sip::tests::bench_str_under_8_bytes ... bench: 37 ns/iter (+/- 1)
test hash::sip::tests::bench_str_of_8_bytes ... bench: 43 ns/iter (+/- 1)
test hash::sip::tests::bench_str_over_8_bytes ... bench: 50 ns/iter (+/- 1)
test hash::sip::tests::bench_long_str ... bench: 613 ns/iter (+/- 14)
test hash::sip::tests::bench_compound_1 ... bench: 114 ns/iter (+/- 11)
after
test hash::sip::tests::bench_u64 ... bench: 25 ns/iter (+/- 0)
test hash::sip::tests::bench_str_under_8_bytes ... bench: 31 ns/iter (+/- 0)
test hash::sip::tests::bench_str_of_8_bytes ... bench: 36 ns/iter (+/- 0)
test hash::sip::tests::bench_str_over_8_bytes ... bench: 40 ns/iter (+/- 0)
test hash::sip::tests::bench_long_str ... bench: 600 ns/iter (+/- 14)
test hash::sip::tests::bench_compound_1 ... bench: 64 ns/iter (+/- 6)
```
Notably it seems smaller keys will hash faster. A long string doesn't see much gains, but compound cuts in half (once compound used a `int` and `u64`).
|
|
|
|
These were fixed in the upgrade from mingw32 to mingw64.
Closes #8663
|
|
|
|
I also deleted a bunch of documentation that was copy/pasted from the
trait definition.
|
|
Exposing ctpop, ctlz, cttz and bswap as taking signed i8/i16/... is just
exposing the internal LLVM names pointlessly (LLVM doesn't have "signed
integers" or "unsigned integers", it just has sized integer types
with (un)signed *operations*).
These operations are semantically working with raw bytes, which the
unsigned types model better.
|
|
|
|
|
|
Regions were renamed to lifetimes a while back, so these functions should probably be renamed as well.
|
|
|
|
work started from @gereeter's PR: https://github.com/mozilla/rust/pull/13114
but adjusted bits
|