about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2013-08-11vec: optimize the Add implementationDaniel Micay-5/+14
before: test add ... bench: 164 ns/iter (+/- 1) after: test add ... bench: 113 ns/iter (+/- 2)
2013-08-11disable 64-bit CheckedMul on 32-bitDaniel Micay-2/+4
code generation problem reported as issue #8449
2013-08-11add intrinsics for checked overflow add/sub/mulDaniel Micay-2/+503
2013-08-10auto merge of #8404 : stepancheg/rust/zero-unit-inline, r=alexcrichtonbors-0/+2
Follow-up to #8155
2013-08-11Add a "peekable" iterator adaptor, with a peek() method that returns the ↵Simon Sapin-0/+72
next element.
2013-08-11std::iterator: Rename .peek() to .inspect()blake2-ppc-19/+20
2013-08-10Merge branch 'trie-bound-iters' of https://github.com/dim-an/rust into rollupErick Tryzelaar-0/+102
2013-08-10std: fix the non-stage0 str::raw::slice_bytes which broke in a mergeErick Tryzelaar-1/+1
2013-08-10std: Transform.find_ -> .findErick Tryzelaar-6/+6
2013-08-10std: Iterator.len_ -> .lenErick Tryzelaar-8/+7
2013-08-10std: Iterator.last_ -> .lastErick Tryzelaar-4/+3
2013-08-10std: Iterator.chain_ -> .chainErick Tryzelaar-10/+10
2013-08-10std: Iterator.flat_map_ -> .flat_mapErick Tryzelaar-5/+4
2013-08-10std: Iterator.take_ -> .takeErick Tryzelaar-29/+27
2013-08-10std: Rename Iterator.transform -> .mapErick Tryzelaar-49/+48
cc #5898
2013-08-10std: merge Iterator and IteratorUtilErick Tryzelaar-280/+202
2013-08-10std: merge iterator::DoubleEndedIterator and DoubleEndedIteratorUtilErick Tryzelaar-28/+15
2013-08-10Mass rename of .consume{,_iter}() to .move_iter()Erick Tryzelaar-67/+67
cc #7887
2013-08-09auto merge of #8296 : erickt/rust/remove-str-trailing-nulls, r=ericktbors-474/+993
This PR fixes #7235 and #3371, which removes trailing nulls from `str` types. Instead, it replaces the creation of c strings with a new type, `std::c_str::CString`, which wraps a malloced byte array, and respects: * No interior nulls * Ends with a trailing null
2013-08-09Merge remote-tracking branch 'remotes/origin/master' into ↵Erick Tryzelaar-199/+637
remove-str-trailing-nulls
2013-08-09auto merge of #8387 : brson/rust/nooldrt, r=brsonbors-2119/+217
2013-08-09Remove the C++ runtime. SayonaraBrian Anderson-2119/+217
2013-08-09auto merge of #8176 : catamorphism/rust/rustpkg-extern-mod, r=catamorphismbors-2/+163
r? @graydon Also, notably, make rustpkgtest depend on the rustpkg executable (otherwise, tests that shell out to rustpgk might run when rustpkg doesn't exist).
2013-08-09std/rustc/rustpkg/syntax: Support the `extern mod = ...` formTim Chevalier-2/+163
This commit allows you to write: extern mod x = "a/b/c"; which means rustc will search in the RUST_PATH for a package with ID a/b/c, and bind it to the name `x` if it's found. Incidentally, move get_relative_to from back::rpath into std::path
2013-08-09auto merge of #8415 : brson/rust/newrt-local-heap-perf, r=pcwalton,brsonbors-68/+92
Mostly optimizing TLS accesses to bring local heap allocation performance closer to that of oldsched. It's not completely at parity but removing the branches involved in supporting oldsched and optimizing pthread_get/setspecific to instead use our dedicated TCB slot will probably make up for it.
2013-08-09Remove rtdebug_! and make rtdebug! work properly.Corey Richardson-12/+4
It now actually does logging, and is compiled out when `--cfg rtdebug` is not given to the libstd build, which it isn't by default. This makes the rt benchmarks 18-50% faster.
2013-08-09std: more windows fixes to os.rs and run.rsErick Tryzelaar-4/+9
2013-08-09auto merge of #8369 : yichoi/rust/arm-test, r=sanxiynbors-4/+4
fix some part of test code to pass make check on ARM Android
2013-08-10std: add a Clone impl for HashSet.Huon Wilson-0/+26
2013-08-09Implement `lower_bound_iter`/`upper_bound_iter` for TrieMap/TrieSetDmitry Ermolov-0/+102
2013-08-09Fix Ipv6Addr to_str for ::1:x.x.x.x addressesStepan Koltsov-1/+8
Reported by luqmana@
2013-08-09std: Fix perf of local allocations in newschedBrian Anderson-68/+92
Mostly optimizing TLS accesses to bring local heap allocation performance closer to that of oldsched. It's not completely at parity but removing the branches involved in supporting oldsched and optimizing pthread_get/setspecific to instead use our dedicated TCB slot will probably make up for it.
2013-08-09Remove redundant Ord method impls.OGINO Masanori-54/+3
Basically, generic containers should not use the default methods since a type of elements may not guarantees total order. str could use them since u8's Ord guarantees total order. Floating point numbers are also broken with the default methods because of NaN. Thanks for @thestinger. Timespec also guarantees total order AIUI. I'm unsure whether extra::semver::Identifier does so I left it alone. Proof needed. Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2013-08-09std::tuple: Use != properly in Eq::ne for tuplesblake2-ppc-1/+1
Just like the Ord methods, Eq::ne needs to be implemented in terms of the same operation on the elements.
2013-08-08Merge remote-tracking branch 'remotes/origin/master' into ↵Erick Tryzelaar-274/+1840
remove-str-trailing-nulls
2013-08-08auto merge of #8336 : stepancheg/rust/socket-addr-from-str, r=brsonbors-70/+367
FromStr implemented from scratch. It is overengineered a bit, however. Old implementation handles errors by fail!()-ing. And it has bugs, like it accepts `127.0.0.1::127.0.0.1` as IPv6 address, and does not handle all ipv4-in-ipv6 schemes. So I decided to implement parser from scratch.
2013-08-08auto merge of #8356 : toddaaro/rust/ws, r=brsonbors-63/+164
This pull request converts the scheduler from a naive shared queue scheduler to a naive workstealing scheduler. The deque is still a queue inside a lock, but there is still a substantial performance gain. Fiddling with the messaging benchmark I got a ~10x speedup and observed massively reduced memory usage. There are still *many* locations for optimization, but based on my experience so far it is a clear performance win as it is now.
2013-08-09Add #[inline] to impl Zero for ()Stepan Koltsov-0/+2
Follow-up to #8155
2013-08-08auto merge of #8385 : cmr/rust/big-rollup, r=alexcrichtonbors-97/+135
This is a fairly large rollup, but I've tested everything locally, and none of it should be platform-specific. r=alexcrichton (bdfdbdd) r=brson (d803c18) r=alexcrichton (a5041d0) r=bstrie (317412a) r=alexcrichton (135c85e) r=thestinger (8805baa) r=pcwalton (0661178) r=cmr (9397fe0) r=cmr (caa4135) r=cmr (6a21d93) r=cmr (4dc3379) r=cmr (0aa5154) r=cmr (18be261) r=thestinger (f10be03)
2013-08-08Enabled workstealing in the scheduler. Previously we had one global work ↵toddaaro-63/+164
queue shared by each scheduler. Now there is a separate work queue for each scheduler, and work is "stolen" from other queues when it is exhausted locally.
2013-08-08std::vec: Fix typo in fn neblake2-ppc-1/+1
2013-08-08std::iterator::order test casesblake2-ppc-0/+47
2013-08-08std: Fix tuple lexicographical orderblake2-ppc-14/+28
Use the definition, where R is <, <=, >=, or > [x, ..xs] R [y, ..ys] = if x != y { x R y } else { xs R ys } Previously, tuples would only implement < and derive the other comparisons from it; this is incorrect. Included are several testcases involving NaN comparisons that are now correct. Previously, tuples would consider an element equal if both a < b and b < a were false, this was also incorrect.
2013-08-08std: Fix Ord for Option, using iterator::orderblake2-ppc-15/+18
2013-08-08std::vec: Use iterator::order functions for Eq, Ord, TotalOrd, TotalEqblake2-ppc-24/+22
2013-08-08std: Implement traits for the one-tupleblake2-ppc-20/+25
(A,) did not have the trait implementations of 2- to 12- tuples.
2013-08-08Add std::iterator::order with lexical ordering functions for sequencesblake2-ppc-0/+110
Use Eq + Ord for lexicographical ordering of sequences. For each of <, <=, >= or > as R, use:: [x, ..xs] R [y, ..ys] = if x != y { x R y } else { xs R ys } Previous code using `a < b` and then `!(b < a)` for short-circuiting fails on cases such as [1.0, 2.0] < [0.0/0.0, 3.0], where the first element was effectively considered equal.
2013-08-08std: more fixes for os.rs for windowsErick Tryzelaar-2/+3
2013-08-08auto merge of #8245 : alexcrichton/rust/fmt2, r=graydonbors-2/+1331
This is a reopening of #8182, although this removes any abuse of the compiler internals. Now it's just a pure syntax extension (hard coded what the attribute names are).
2013-08-07std: import HANDLE for os::list_dir for windowsErick Tryzelaar-0/+1