| Age | Commit message (Collapse) | Author | Lines |
|
This will all be reimplemented in the new runtime.
|
|
.peek_next() needs to check the element counter just like the .next()
and .next_back() iterators do.
Also clarify .insert_next() doc w.r.t double ended iteration.
|
|
|
|
SmallIntSet is equivalent to BitvSet but with 8 times the memory
overhead. There's no reason for it to exist.
|
|
|
|
We don't need TotalOrd for ordered insertion, just the normal sort order
Ord.
|
|
These tests for ~[] performance don't really belong here, they were for
comparison.
|
|
|
|
Made the `iter` and `mut_iter` methods on SmallIntMap and SmallIntSet return double-ended-iterators. These iterators now implement `size_hint`.
Also the iterator tests only tested dense maps/sets, which aren't very useful. So they were changed to iterate over sparse maps/sets.
Fixes #7721
|
|
Add methods to move back element to front or front element to back,
without reallocating nodes.
|
|
Factor out internal methods for pop/push ~Node<T>, This allows moving
nodes instead of destructuring and allocating new.
Make use of this in .merge() so that it requires no allocations when
merging two DList.
|
|
Make the core Deque implementation a bit simpler by using Option methods
when we simply map on a Some value, and deduplicate some common lines.
|
|
This impl was missing for unknown reason.
|
|
|
|
|
|
BitvVariant is the same size as it was before (16 bytes).
|
|
|
|
|
|
This adds new #[bench] benchmarks for extra::smallintmap, treemap, sha1, sha256 and 512, and base64. Also fixes a bunch of warnings in bitv.
|
|
r? @nikomatsakis
|
|
Place `pub` or `priv` on individual items instead.
|
|
Implement method .cycle() that repeats an iterator endlessly
Implement Clone for simple iterators (without closures), including VecIterator.
> The theory is simple, the immutable iterators simply hold state
> variables (indicies or pointers) into frozen containers. We can freely
> clone these iterators, just like we can clone borrowed pointers.
|
|
|
|
r? @brson
|
|
|
|
|
|
|
|
|
|
Also changed the tests to iterate over sparse maps/sets.
|
|
|
|
Fix warnings that only show up when compiling the tests for libstd, libextra and one in librusti. Only trivial changes.
|
|
This makes custom borrowing implementations for custom smart pointers
sound.
|
|
Updated all users of HashMap, HashSet ::consume() to use
.consume_iter().
Since .consume_iter() takes the map or set by value, it needs awkward
extra code to in librusti's use of @mut HashMap, where the map value can
not be directly moved out.
Addresses issue #7719
|
|
Progress on #7824, closes #7825
|
|
Updated all users of HashMap, HashSet old .consume() to use .consume()
with a for loop.
Since .consume() takes the map or set by value, it needs awkward
extra code to in librusti's use of @mut HashMap, where the map value can
not be directly moved out.
|
|
Most of these are "unneccesary allocation" in bitv, for ~[false, ..] instead
of [false, ..].
|
|
|
|
bootstrapping on Windows.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This should get us over the hump of activating basic ratcheting on codegen tests, at least. It also puts in place optional (disabled by default) ratcheting on all #[bench] tests, and records all metrics from them to harvestable .json files in any case.
|
|
|
|
Fixes Issue #7764
Running `make check` I do get a failure:
test rt::io::extensions::test::push_bytes ... ok
rustest rt::comm::test::oneshot_single_thread_send_port_close ... t: task failed at 'Unhandled condition:
read_error: {kind: OtherIoError, desc: "Placeholder error. You shouldn\'t be seeing this", detail: None}',
/Users/shout/Projects/rust/src/libstd/condition.rs:50
/bin/sh: line 1: 35056 Abort trap: 6 x86_64-apple-darwin/stage2/test/stdtest-x86_64-apple-darwin --logfile
tmp/check-stage2-T-x86_64-apple-darwin-H-x86_64-apple-darwin-std.log
make: *** [tmp/check-stage2-T-x86_64-apple-darwin-H-x86_64-apple-darwin-std.ok] Error 134
|
|
Progress on #7824
|
|
pnkfelix/rust/fsk-invert-range-rev-halfclosedness-issue5270-2ndpr, r=cmr
Changes int/uint range_rev to iterate over range `(hi,lo]` instead of `[hi,lo)`.
Fix #5270.
Also:
* Adds unit tests for int/uint range functions
* Updates the uses of `range_rev` to account for the new semantics. (Note that pretty much all of the updates there were strict improvements to the code in question; yay!)
* Exposes new function, `range_step_inclusive`, which does the range `[hi,lo]`, (at least when `hi-lo` is a multiple of the `step` parameter).
* Special-cases when `|step| == 1` removing unnecessary bounds-check. (I did not check whether LLVM was already performing this optimization; I figure it would be a net win to not leave that analysis to the compiler. If reviewer objects, I can easily remove that from the refactored code.)
(This pull request is a rebased version of PR #7524, which went stale due to recent unrelated changes to num libraries.)
|