summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2013-08-19Homed UDP socketsEric Reed-24/+213
2013-08-19Working homing UDP socket prototype.Eric Reed-1/+151
2013-08-19Instruct event loops to ignore SIGPIPE when constructed.Eric Reed-0/+1
libuv does not always catch SIGPIPE.
2013-08-19Do not execute the callback before cleaning up resources.Eric Reed-8/+6
2013-08-19Derive Clone for IpAddr and SocketAddrEric Reed-2/+2
2013-08-19Try to fix mac valgrind bot by disabling thread-heavy activities.Graydon Hoare-15/+64
2013-08-19auto merge of #8459 : thestinger/rust/checked, r=graydonbors-2/+42
2013-08-19clean whitespace :/toddaaro-6/+6
2013-08-19Rangechange the log message truncation limit.Michael Sullivan-1/+1
2013-08-19std::str: Use iterators instead of while loops for CharSplitIteratorblake2-ppc-33/+45
Embed an iterator in the CharSplitIterator struct, and combine that with the former bool `only_ascii`; so use an enum instead.
2013-08-19auto merge of #8535 : nikomatsakis/rust/issue-3678-wrappers-be-gone-2, r=graydonbors-48/+489
Long-standing branch to remove foreign function wrappers altogether. Calls to C functions are done "in place" with no stack manipulation; the scheme relies entirely on the correct use of `#[fixed_stack_segment]` to guarantee adequate stack space. A linter is added to detect when `#[fixed_stack_segment]` annotations are missing. An `externfn!` macro is added to make it easier to declare foreign fns and wrappers in one go: this macro may need some refinement, though, for example it might be good to be able to declare a group of foreign fns. I leave that for future work (hopefully somebody else's work :) ). Fixes #3678.
2013-08-19Add externfn macro and correctly label fixed_stack_segmentsNiko Matsakis-48/+489
2013-08-19std::str: Improve comments for CharIteratorblake2-ppc-1/+9
2013-08-19std::str: Use CharOffsetIterator in slice_charsblake2-ppc-13/+14
2013-08-19std::str: Only check char boundary for end index in .slice_to()blake2-ppc-1/+2
2013-08-19std::str: Correct docstrings for lack of null terminator in ~str and &strblake2-ppc-24/+13
2013-08-19std::str: Use CharOffsetIterator in .find() and .rfind()blake2-ppc-6/+3
2013-08-19std::str: Implement CharIterator separatelyblake2-ppc-35/+68
Let CharIterator be a separate type from CharOffsetIterator (so that CharIterator can be cloned, for example). Implement CharOffsetIterator by using the same technique as the method subslice_offset.
2013-08-19std::str: Add str::raw::slice_uncheckedblake2-ppc-4/+13
Add a function like raw::slice_bytes, but it doesn't check slice boundaries. For iterator use where we always know the begin, end indices are in range.
2013-08-19std::str: Special case char_range_at_reverse so it is fasterblake2-ppc-13/+21
Implement char_range_at_reverse similarly to char_range_at, instead of re-using that method.
2013-08-19std::str: Small fix for sliceblake2-ppc-2/+3
2013-08-19std::str: Bench test for char iteratorsblake2-ppc-0/+56
2013-08-19auto merge of #8564 : alexcrichton/rust/ifmt+++, r=graydonbors-4/+58
See discussion in #8489, but this selects option 3 by adding a `Default` trait to be implemented by various basic types. Once this makes it into a snapshot I think it's about time to start overhauling all current use-cases of `fmt!` to move towards `ifmt!`. The goal is to replace `%X` with `{}` in 90% of situations, and this commit should enable that.
2013-08-19Fix mod_floor() for uint primitive typesKevin Ballard-2/+15
2013-08-18Update size_hint()s on std::iterator IteratorsKevin Ballard-10/+31
Add size_hint() to a few Iterators that were missing it. Update a couple of existing size_hint()s to use checked_add() instead of saturating_add() for the upper bound.
2013-08-18Implement .size_hint() on new vec iteratorsKevin Ballard-1/+69
2013-08-18auto merge of #8565 : bblum/rust/select-bugfix, r=brsonbors-18/+23
@brson grilled me about how this bugfix worked the first time around, and it occurred to me that it didn't in the case where the task is unwinding. Now it will.
2013-08-18Delete std::rt::io::net::httpSteven Fackler-30/+0
It's an empty stub and as one of the comments notes, doesn't belong in libstd.
2013-08-18auto merge of #8560 : kballard/rust/reserve-yield, r=pcwaltonbors-32/+32
Rename task::yield() to task::deschedule(). Fixes #8494.
2013-08-18auto merge of #8545 : blake2-ppc/rust/iterbytes, r=alexcrichtonbors-61/+89
Address issue #5257, for example these values all had the same hash value: ("aaa", "bbb", "ccc") ("aaab", "bb", "ccc") ("aaabbb", "", "ccc") IterBytes for &[A] now includes the length, before calling iter_bytes on each element. IterBytes for &str is now terminated by a byte that does not appear in UTF-8. This way only one more byte is processed when hashing strings.
2013-08-18auto merge of #8558 : kballard/rust/xorshift-seed, r=cmrbors-6/+15
Fixes #8359.
2013-08-18std::hash: Add testcase for colliding hashes of tuplesblake2-ppc-0/+14
Add a testcase that verifies that (s, t) and (u, v) don't collide even if s + t == u + v (concatenation).
2013-08-18std::to_bytes: Implement IterBytes on 1- to 8-tuplesblake2-ppc-20/+29
2013-08-18std::to_bytes: Delimit sequences &[A] and ~str when hashingblake2-ppc-42/+47
Address issue #5257, for example these values all had the same hash value: ("aaa", "bbb", "ccc") ("aaab", "bb", "ccc") ("aaabbb", "", "ccc") IterBytes for &[A] now includes the length, before calling iter_bytes on each element. IterBytes for &str is now terminated by a byte that does not appear in UTF-8. This way only one more byte is processed when hashing strings.
2013-08-18auto merge of #8555 : chris-morgan/rust/time-clone, r=huonwbors-1/+15
I need `Clone` for `Tm` for my latest work on [rust-http](https://github.com/chris-morgan/rust-http) (static typing for headers, and headers like `Date` are a time), so here it is. @huonw recommended deriving DeepClone while I was at it. I also had to implement `DeepClone` for `~str` to get a derived implementation of `DeepClone` for `Tm`; I did `@str` while I was at it, for consistency.
2013-08-18auto merge of #8551 : huonw/rust/speling, r=alexcrichtonbors-58/+59
(This doesn't add/remove `u`s or change `ize` to `ise`, or anything like that.)
2013-08-18More spelling corrections.Huon Wilson-7/+9
2013-08-17auto merge of #8433 : brson/rust/rm-more-oldrt-crud, r=brsonbors-5/+0
Just deleting more stuff.
2013-08-17Fix warnings in testsErick Tryzelaar-1/+1
2013-08-16A round of code cleaning for the primary scheduler code. Comments have been ↵toddaaro-275/+201
updated, a minor amount of support type restructing has happened, methods have been reordered, and some duplicate code has been purged.
2013-08-16Moved the logic for a pausible idle callback into a new type - ↵toddaaro-96/+103
PausibleIdleCallback and placed the appropriate signatures in rtio and implementation into uvio.
2013-08-16std::rt: Fix a race in UvRemoteCallback's dtor that misses callbacksBrian Anderson-7/+74
Full description in comments.
2013-08-16std::rt: Touch up idle logicBrian Anderson-16/+36
2013-08-16an attempt at a singleton pausible idle callback for each scheduler. suffers ↵toddaaro-19/+83
from nondeterministic deadlock and also pending scheduler messages on scheduler shutdown.
2013-08-16Delegate `{}` to Default instead of PolyAlex Crichton-1/+55
By using a separate trait this is overridable on a per-type basis and makes room for the possibility of even more arguments passed in for the future.
2013-08-16Implement `{:s}` for ~str and @str as wellAlex Crichton-3/+3
2013-08-16Reserve 'yield' keywordKevin Ballard-32/+32
Rename task::yield() to task::deschedule(). Fixes #8494.
2013-08-16Remove the annihilate lang itemBrian Anderson-5/+0
2013-08-16Give XorShiftRng::new() a random seedKevin Ballard-6/+15
Fixes #8359.
2013-08-16auto merge of #8534 : huonw/rust/tls-key-macro, r=alexcrichtonbors-2/+2
This allows the internal implementation details of the TLS keys to be changed without requiring the update of all the users. (Or, applying changes that *have* to be applied for the keys to work correctly, e.g. forcing LLVM to not merge these constants.)