| Age | Commit message (Collapse) | Author | Lines |
|
|
|
It is sometimes useful to parse just the path portion of a URL (path,
query string and fragment) rather than the entire URL.
|
|
This, the Nth rewrite of channels, is not a rewrite of the core logic behind
channels, but rather their API usage. In the past, we had the distinction
between oneshot, stream, and shared channels, but the most recent rewrite
dropped oneshots in favor of streams and shared channels.
This distinction of stream vs shared has shown that it's not quite what we'd
like either, and this moves the `std::comm` module in the direction of "one
channel to rule them all". There now remains only one Chan and one Port.
This new channel is actually a hybrid oneshot/stream/shared channel under the
hood in order to optimize for the use cases in question. Additionally, this also
reduces the cognitive burden of having to choose between a Chan or a SharedChan
in an API.
My simple benchmarks show no reduction in efficiency over the existing channels
today, and a 3x improvement in the oneshot case. I sadly don't have a
pre-last-rewrite compiler to test out the old old oneshots, but I would imagine
that the performance is comparable, but slightly slower (due to atomic reference
counting).
This commit also brings the bonus bugfix to channels that the pending queue of
messages are all dropped when a Port disappears rather then when both the Port
and the Chan disappear.
|
|
Removed use of globs present in earlier versions of modules.
Fix tutorial.md to reflect `extra::rational` ==> `num::rational`.
|
|
Also move Void to std::any, move drop to std::mem and reexport in
prelude.
|
|
This allows a result to be marked as "used" by passing it to a function
LLVM cannot see inside (unless LTO is enabled).
Closes #8261.
|
|
benchmarking.
This allows a result to be marked as "used" by passing it to a function
LLVM cannot see inside. By making `iter` generic and using this
`black_box` on the result benchmarks can get this behaviour simply by
returning their computation.
|
|
MaybeOwned allows from_utf8_lossy to avoid allocation if there are no
invalid bytes in the input.
Before:
```
test str::bench::from_utf8_lossy_100_ascii ... bench: 183 ns/iter (+/- 5)
test str::bench::from_utf8_lossy_100_invalid ... bench: 341 ns/iter (+/- 15)
test str::bench::from_utf8_lossy_100_multibyte ... bench: 227 ns/iter (+/- 13)
test str::bench::from_utf8_lossy_invalid ... bench: 102 ns/iter (+/- 4)
test str::bench::is_utf8_100_ascii ... bench: 2 ns/iter (+/- 0)
test str::bench::is_utf8_100_multibyte ... bench: 2 ns/iter (+/- 0)
```
Now:
```
test str::bench::from_utf8_lossy_100_ascii ... bench: 96 ns/iter (+/- 4)
test str::bench::from_utf8_lossy_100_invalid ... bench: 318 ns/iter (+/- 10)
test str::bench::from_utf8_lossy_100_multibyte ... bench: 105 ns/iter (+/- 2)
test str::bench::from_utf8_lossy_invalid ... bench: 105 ns/iter (+/- 2)
test str::bench::is_utf8_100_ascii ... bench: 2 ns/iter (+/- 0)
test str::bench::is_utf8_100_multibyte ... bench: 2 ns/iter (+/- 0)
```
|
|
Declare a `type SendStr = MaybeOwned<'static>` to ease readibility of
types that needed the old SendStr behavior.
Implement all the traits for MaybeOwned that SendStr used to implement.
|
|
Avoid using -1 as a char sentinel, when Option<char> is the perfect
thing.
|
|
|
|
|
|
|
|
|
|
This complements `usage` by auto-generating a short one-liner summary
of the options.
(First timer here, be gentle... :)
|
|
- `extra::json` didn't make the cut, because of `extra::json` required
dep on `extra::TreeMap`. If/when `extra::TreeMap` moves out of `extra`,
then `extra::json` could move into `serialize`
- `libextra`, `libsyntax` and `librustc` depend on the newly created
`libserialize`
- The extensions to various `extra` types like `DList`, `RingBuf`, `TreeMap`
and `TreeSet` for `Encodable`/`Decodable` were moved into the respective
modules in `extra`
- There is some trickery, evident in `src/libextra/lib.rs` where a stub
of `extra::serialize` is set up (in `src/libextra/serialize.rs`) for
use in the stage0 build, where the snapshot rustc is still making
deriving for `Encodable` and `Decodable` point at extra. Big props to
@huonw for help working out the re-export solution for this
extra: inline extra::serialize stub
fix stuff clobbered in rebase + don't reexport serialize::serialize
no more globs in libserialize
syntax: fix import of libserialize traits
librustc: fix bad imports in encoder/decoder
add serialize dep to librustdoc
fix failing run-pass tests w/ serialize dep
adjust uuid dep
more rebase de-clobbering for libserialize
fixing tests, pushing libextra dep into cfg(test)
fix doc code in extra::json
adjust index.md links to serialize and uuid library
|
|
|
|
This allows patch adds a new arc type that allows for creation of copy-on-write data structures. The idea is that it is safe to mutate any data structure as long as it has only one reference to it. If there are multiple, it requires cloning of the data structure before mutation is possible.
|
|
|
|
Changes in std::{str,vec,hashmap} and extra::{priority_queue,ringbuf}.
Fixes #11949
|
|
|
|
cc #8784
|
|
Changes in std::{str,vec,hashmap} and extra::{priority_queue,ringbuf}.
Fixes #11949
|
|
cc #10834
|
|
cc #10834
|
|
Done as a part of #8784.
|
|
|
|
|
|
This originally lived in std::unstable::mutex, but now it has a new home (and a
more proper one).
|
|
|
|
|
|
|
|
|
|
Done as a part of #8784.
Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
|
|
cc #8784
|
|
This complements `usage` by auto-generating a short one-liner summary
of the options.
|
|
This removes @[] from the parser as well as much of the handling of it (and `@str`) from the compiler as I can find.
I've just rebased @pcwalton's (already reviewed) `@str` removal (and fixed the problems in a separate commit); the only new work is the trailing commits with my authorship.
Closes #11967
|
|
|
|
Closes #11733
|
|
|
|
|
|
of builtin bounds.
Fixes #10834.
Fixes #11385.
cc #5922.
|
|
|
|
|
|
Fixes #11814
|
|
`Times::times` was always a second-class loop because it did not support the `break` and `continue` operations. Its playful appeal was then lost after `do` was disabled for closures. It's time to let this one go.
|
|
|
|
Fixes #11814
|
|
Fixes #10815.
|
|
|