about summary refs log tree commit diff
path: root/src/libextra
AgeCommit message (Collapse)AuthorLines
2013-07-22extra: Remove uv, net, timer codeBrian Anderson-6324/+4
This will all be reimplemented in the new runtime.
2013-07-22dlist: Fix .peek_next() w.r.t double ended iteratorsblake2-ppc-1/+6
.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.
2013-07-22new snapshotDaniel Micay-36/+2
2013-07-21Eliminated SmallIntSetSteven Fackler-369/+0
SmallIntSet is equivalent to BitvSet but with 8 times the memory overhead. There's no reason for it to exist.
2013-07-21dlist: Remove extraneous unwrap in .pop_back_node()blake2-ppc-3/+3
2013-07-21dlist: Use Ord for .insert_ordered()blake2-ppc-3/+2
We don't need TotalOrd for ordered insertion, just the normal sort order Ord.
2013-07-21dlist: Remove bench tests for vecblake2-ppc-37/+1
These tests for ~[] performance don't really belong here, they were for comparison.
2013-07-21dlist: Add bench test for rotate_to_{front, back}blake2-ppc-0/+19
2013-07-21auto merge of #7921 : bytewiseand/rust/smallint-iter, r=huonwbors-139/+177
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
2013-07-21dlist: Add .rotate_to_front(), .rotate_to_back()blake2-ppc-0/+43
Add methods to move back element to front or front element to back, without reallocating nodes.
2013-07-21dlist: Factor out pop and push operations by list nodeblake2-ppc-54/+104
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.
2013-07-21dlist: Simplify match clauses to use Option methodsblake2-ppc-65/+33
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.
2013-07-21serialize: implement Encodable for DListblake2-ppc-0/+13
This impl was missing for unknown reason.
2013-07-21Added bitv iterator benchmarksSteven Fackler-0/+36
2013-07-21Added iterator testsSteven Fackler-0/+19
2013-07-21Removed unecessary indirection in BitvSteven Fackler-16/+16
BitvVariant is the same size as it was before (16 bytes).
2013-07-21Derive Clone for bitv stuffSteven Fackler-18/+24
2013-07-21Switched bitv to external iteratorsSteven Fackler-17/+54
2013-07-20auto merge of #7912 : graydon/rust/extra-new-benchmarks-1, r=catamorphismbors-68/+409
This adds new #[bench] benchmarks for extra::smallintmap, treemap, sha1, sha256 and 512, and base64. Also fixes a bunch of warnings in bitv.
2013-07-20auto merge of #7896 : pcwalton/rust/pub-extern, r=pcwaltonbors-28/+28
r? @nikomatsakis
2013-07-20librustc: Remove `pub extern` and `priv extern` from the language.Patrick Walton-28/+28
Place `pub` or `priv` on individual items instead.
2013-07-20auto merge of #7882 : blake2-ppc/rust/iterator-clone, r=thestingerbors-0/+23
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.
2013-07-20dlist: Implement Clone for immutable iteratorsblake2-ppc-0/+23
2013-07-20auto merge of #7894 : pcwalton/rust/and-pointers-in-at-boxes, r=brsonbors-7/+18
r? @brson
2013-07-20Use Option .take() or .take_unwrap() instead of util::replace where possibleblake2-ppc-9/+7
2013-07-20Fix warnings in stdtest and extratest. Maybe somebody will care.Ben Blum-2/+0
2013-07-20Reimplement ARC::unwrap() and friends.Ben Blum-8/+72
2013-07-19Added a new method to extra::future (unwrap) + a testMatthijs Hofstra-0/+19
2013-07-20smallint{map,set}: replace iterators with DoubleEndedIteratorAndreas Martens-139/+177
Also changed the tests to iterate over sparse maps/sets.
2013-07-19extra: add some microbenchmarksGraydon Hoare-70/+409
2013-07-18auto merge of #7857 : blake2-ppc/rust/fix-test-warnings, r=alexcrichtonbors-26/+25
Fix warnings that only show up when compiling the tests for libstd, libextra and one in librusti. Only trivial changes.
2013-07-18librustc: Forbid `&` pointers (other than `&'static`) inside `@` boxes.Patrick Walton-7/+18
This makes custom borrowing implementations for custom smart pointers sound.
2013-07-18auto merge of #7833 : blake2-ppc/rust/hashmap-consume, r=alexcrichtonbors-2/+1
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
2013-07-18auto merge of #7840 : alexcrichton/rust/better-test-help, r=huonwbors-8/+52
Progress on #7824, closes #7825
2013-07-18hashmap: Remove .consume() has rename .consume_iter() to .consume()blake2-ppc-2/+1
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.
2013-07-18Fix warnings in libextra testsblake2-ppc-26/+25
Most of these are "unneccesary allocation" in bitv, for ~[false, ..] instead of [false, ..].
2013-07-17libextra: Add a stray deriving or two.Patrick Walton-1/+10
2013-07-17libsyntax: Remove some multi-gigabyte clones that were preventing ↵Patrick Walton-12/+12
bootstrapping on Windows.
2013-07-17test: Fix tests.Patrick Walton-16/+20
2013-07-17librustc: Remove the `Copy` bound from the language.Patrick Walton-4/+1
2013-07-17librustc: Change repeated vector expressions to use implicit copyability.Patrick Walton-2/+22
2013-07-17test: Fix tests.Patrick Walton-14/+33
2013-07-17librustc: Remove all uses of the `Copy` bound.Patrick Walton-20/+12
2013-07-17librustc: Remove all uses of "copy".Patrick Walton-278/+298
2013-07-17librustc: Add a lint mode for unnecessary `copy` and remove a bunch of them.Patrick Walton-11/+13
2013-07-17auto merge of #7829 : graydon/rust/codegen-compiletests, r=cmrbors-25/+179
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.
2013-07-17extra: avoid possible divide-by-zero conditions test.Graydon Hoare-4/+5
2013-07-16auto merge of #7831 : ozten/rust/issues-7764-swap_unwarp-take-unwrap, r=pcwaltonbors-14/+14
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
2013-07-16Provide more useful messages when tests are given -h or --helpAlex Crichton-8/+52
Progress on #7824
2013-07-16auto merge of #7684 : ↵bors-2/+2
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.)