about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2013-06-18std::rt: Improve the rtabort! macroBrian Anderson-15/+72
2013-06-18std::rt: Turn on multithreaded schedulingBrian Anderson-16/+76
2013-06-17std: Rename `abort!` to `rtabort!` to match other macrosBrian Anderson-23/+23
2013-06-17std::rt: move abort function to util moduleBrian Anderson-9/+5
2013-06-17std::rt: Check exchange count on exitBrian Anderson-6/+37
2013-06-17std::rt: Add util mod and num_cpus functionBrian Anderson-5/+27
2013-06-16Merge remote-tracking branch 'brson/io'Brian Anderson-794/+2881
Conflicts: src/libstd/rt/comm.rs src/libstd/rt/mod.rs src/libstd/rt/sched.rs src/libstd/rt/task.rs src/libstd/rt/test.rs src/libstd/rt/tube.rs src/libstd/rt/uv/uvio.rs src/libstd/rt/uvio.rs src/libstd/task/spawn.rs
2013-06-15Merge remote-tracking branch 'brson/io-wip' into ioBrian Anderson-105/+788
Conflicts: src/libstd/rt/sched.rs src/libstd/rt/task.rs src/libstd/rt/test.rs src/libstd/task/mod.rs src/libstd/task/spawn.rs
2013-06-15std::rt: Tasks contain a JoinLatchBrian Anderson-32/+56
2013-06-15Merge remote-tracking branch 'toddaaro/io' into ioBrian Anderson-93/+807
2013-06-15auto merge of #7147 : huonw/rust/vec-connect, r=Aatchbors-16/+18
This is caused by StrVector having a generic implementation for &[S] and so #5898 means that method resolution of ~[~[1]].concat() sees that both StrVector and VectorVector have methods that (superficially) match. They are now connect_vec and concat_vec, which means that they can actually be called.
2013-06-15auto merge of #7109 : bblum/rust/rwlocks, r=brsonbors-4/+8
r? @brson links to issues: #7065 the race that's fixed; #7066 the perf improvement I added. There are also some minor cleanup commits here. To measure the performance improvement from replacing the exclusive with an atomic uint, I edited the ```msgsend-ring-rw-arcs``` bench test to do a ```write_downgrade``` instead of just a ```write```, so that it stressed the code paths that accessed ```read_count```. (At first I was still using ```write``` and saw no performance difference whatsoever, whoooops.) The bench test measures how long it takes to send 1,000,000 messages by using rwarcs to emulate pipes. I also measured the performance difference imposed by the fix to the ```access_lock``` race (which involves taking an extra semaphore in the ```cond.wait()``` path). The net result is that fixing the race imposes a 4% to 5% slowdown, but doing the atomic uint optimization gives a 6% to 8% speedup. Note that this speedup will be most visible in read- or downgrade-heavy workloads. If an RWARC's only users are writers, the optimization doesn't matter. All the same, I think this more than justifies the extra complexity I mentioned in #7066. The raw numbers are: ``` with xadd read count before write_cond fix 4.18 to 4.26 us/message with write_cond fix 4.35 to 4.39 us/message with exclusive read count before write_cond fix 4.41 to 4.47 us/message with write_cond fix 4.65 to 4.76 us/message ```
2013-06-14auto merge of #7122 : thestinger/rust/std, r=luqmanabors-14/+14
2013-06-14auto merge of #7110 : thestinger/rust/iterator, r=brsonbors-140/+6
2013-06-15std: rename .connect/.concat in VectorVector to avoid conflicting with ↵Huon Wilson-16/+18
StrVector. This is caused by StrVector having a generic implementation for &[S] and so #5898 means that method resolution of ~[~[1]].concat() sees that both StrVector and VectorVector have methods that (superficially) match. They are now connect_vec and concat_vec, which means that they can actually be called.
2013-06-14rm CopyableNonstrictIterDaniel Micay-53/+1
copies can just be done explicitly: `xs.transform(|x|x.clone())`
2013-06-14rm MutableIterDaniel Micay-28/+1
replaced with mutable implementations of Iterator
2013-06-14rm ExtendedMutableIterDaniel Micay-12/+0
replaced with `xs.mut_iter().enumerate()`
2013-06-14add IteratorUtil to the preludeDaniel Micay-47/+4
2013-06-14auto merge of #7116 : thestinger/rust/whitespace, r=luqmanabors-5/+0
2013-06-14redesigned the pinning to pin deal with things on dequeue, not on enqueuetoddaaro-213/+393
2013-06-14std: get std::path tests to work againErick Tryzelaar-0/+1
2013-06-13std::rt: Tasks must have an unwinder. SimplerBrian Anderson-57/+13
2013-06-13std::rt: Change the Task constructors to reflect a treeBrian Anderson-26/+81
2013-06-13std::rt: Add JoinLatchBrian Anderson-4/+665
This is supposed to be an efficient way to link the lifetimes of tasks into a tree. JoinLatches form a tree and when `release` is called they wait on children then signal the parent. This structure creates zombie tasks which currently keep the entire task allocated. Zombie tasks are supposed to be tombstoned but that code does not work correctly.
2013-06-13Revert "std: convert {vec,str}::to_owned to methods."Brian Anderson-30/+32
This fixes the strange random crashes in compile-fail tests. This reverts commit 96cd61ad034cc9e88ab6a7845c3480dbc1ea62f3. Conflicts: src/librustc/driver/driver.rs src/libstd/str.rs src/libsyntax/ext/quote.rs
2013-06-13update the libstd docstring for the renameDaniel Micay-14/+14
2013-06-13automated whitespace fixesDaniel Micay-5/+0
2013-06-13auto merge of #7105 : sstewartgallus/rust/removed_unused_imports, r=sanxiynbors-4/+2
I was able to remove unused imports, and fix the following warnings src/libstd/hashmap.rs:23:15: 23:23 warning: unused import [-W unused-imports (default)] src/libstd/task/spawn.rs:95:15: 95:23 warning: unused import [-W unused-imports (default)] src/libstd/rt/uv/mod.rs:42:0: 42:9 warning: unused import [-W unused-imports (default)] src/libstd/rt/uv/mod.rs:45:0: 45:9 warning: unused import [-W unused-imports (default)] src/librustc/middle/trans/meth.rs:26:0: 26:26 warning: unused import [-W unused-imports (default)] src/librustc/back/link.rs:210:20: 210:25 warning: unused import [-W unused-imports (default)] I was unable to fix the following unused import warnings. The code here was weird. src/libextra/std.rc:40:11: 40:14 warning: unused import [-W unused-imports (default)] src/libextra/std.rc:40:16: 40:24 warning: unused import [-W unused-imports (default)]
2013-06-13Remove unused importsSteven Stewart-Gallus-4/+2
I was able to remove unused imports, and fix the following warnings src/libstd/hashmap.rs:23:15: 23:23 warning: unused import [-W unused-imports (default)] src/libstd/task/spawn.rs:95:15: 95:23 warning: unused import [-W unused-imports (default)] src/libstd/rt/uv/mod.rs:42:0: 42:9 warning: unused import [-W unused-imports (default)] src/libstd/rt/uv/mod.rs:45:0: 45:9 warning: unused import [-W unused-imports (default)] src/librustc/middle/trans/meth.rs:26:0: 26:26 warning: unused import [-W unused-imports (default)] src/librustc/back/link.rs:210:20: 210:25 warning: unused import [-W unused-imports (default)] I was unable to fix the following unused import warnings. The code here was weird. src/libextra/std.rc:40:11: 40:14 warning: unused import [-W unused-imports (default)] src/libextra/std.rc:40:16: 40:24 warning: unused import [-W unused-imports (default)]
2013-06-13auto merge of #7100 : thestinger/rust/hashmap, r=pnkfelixbors-7/+1
Not much point in leaving these around. They just get in the way when you actually want to log something else.
2013-06-13hashmap: remove leftover debug!() loggingDaniel Micay-7/+1
2013-06-12auto merge of #7096 : huonw/rust/invalid-null-str, r=thestingerbors-16/+0
A slice of a 'static str is still 'static, but doesn't necessarily have the null terminator.
2013-06-13std: remove the invalid NullTerminatedStr instance for &'static str.Huon Wilson-16/+0
A slice of a 'static str is still 'static, but doesn't necessarily have the null terminator.
2013-06-12auto merge of #7027 : sstewartgallus/rust/dynamic_lib, r=graydonbors-0/+207
I would appreciate if someone could help out with the Windows code on this pull request. I tried to test it using WINE but I couldn't figure out a way to set that up.
2013-06-12Document unstable::atomics fetch_* return valuesBen Blum-0/+6
2013-06-12make util::NonCopyable a unit struct instead of a struct with a unitBen Blum-4/+2
2013-06-12Prototyped a dynamic library facility interfaceSteven Stewart-Gallus-0/+207
2013-06-13std: make all strings Equiv-alent to each other, generalise Path.push_many ↵Huon Wilson-9/+21
to take any type of string.
2013-06-12added functionality to tell schedulers to refuse to run tasks that are not ↵toddaaro-18/+60
pinned to them
2013-06-12auto merge of #7073 : influenza/rust/iterator-doc-fixes, r=catamorphismbors-3/+3
This commit fixes two typos and an incorrect description.
2013-06-12std::rt: Remove old filesBrian Anderson-902/+0
2013-06-12A basic implementation of pinning tasks to schedulers. No IO interactions ↵toddaaro-42/+496
have been planned for, and no forwarding of tasks off special schedulers is supported.
2013-06-11auto merge of #7072 : thestinger/rust/ptr, r=catamorphismbors-13/+29
I don't think this will even show up in the documentation right now.... but it should still be correct :).
2013-06-12std: fix windowsHuon Wilson-1/+1
2013-06-12std: fix method renaming.Huon Wilson-1/+1
2013-06-12std: generalise .trim_chars to use CharEq.Huon Wilson-42/+74
2013-06-12std: create Str trait for DRY. Use it on StrVector.Huon Wilson-85/+32
The Str trait collects the various strings types and provides a method for coercing to a slice, so that functions and impls can be written for generic types containing strings (e.g. &[~str], &[&str], ...) without having to write one for each string type (assuming that the impl only needs a slice).
2013-06-12std: convert str::escape_* to methods.Huon Wilson-44/+34
2013-06-12std: convert str::replace to a method.Huon Wilson-33/+33