Eric Reed
6a1a7819c9
Merge remote-tracking branch 'upstream/io' into io
...
Conflicts:
src/libstd/rt/test.rs
src/rt/rustrt.def.in
2013-07-02 16:55:56 -07:00
Eric Reed
e6c57793be
IPv6 support for UDP and TCP.
2013-07-02 16:40:57 -07:00
Brian Anderson
f8a4d09f7e
std: Use the same task failure message as C++ rt
2013-07-02 16:04:45 -07:00
toddaaro
0607178280
A missing ! made it so that the testcase schedule_home_states was throwing spurious assert failures. Why this did not result in the test case failing previously is beyond me.
2013-07-02 11:44:51 -07:00
Steven Fackler
3e265e7842
Small documentation changes
...
I'm leaving the Sized kind undocumented since it isn't fully implemented
yet.
2013-07-01 23:37:11 -07:00
toddaaro
27818ea7c4
removed unnecessary import that slipped in during merge
2013-07-01 16:51:59 -07:00
toddaaro
062bfd310a
merging task/coroutine refactoring back into upstream
2013-07-01 16:41:17 -07:00
toddaaro
5cfad4b6de
Refactored the runtime to view coroutines as a component of tasks, instead of tasks as a component of coroutines.
2013-07-01 16:14:56 -07:00
bors
d324014c6c
auto merge of #7521 : thestinger/rust/vec, r=Aatch
...
continued from #7495
2013-07-01 02:26:46 -07:00
Huon Wilson
c437a16c5d
rustc: add a lint to enforce uppercase statics.
2013-07-01 17:52:57 +10:00
bors
07feeb95c5
auto merge of #7487 : huonw/rust/vec-kill, r=cmr
...
Continuation of #7430 .
I haven't removed the `map` method, since the replacement `v.iter().transform(f).collect::<~[SomeType]>()` is a little ridiculous at the moment.
2013-06-30 21:14:13 -07:00
Daniel Micay
5b40f2ae5b
pass exchange_malloc an alignment, not a tydesc
2013-06-30 23:30:40 -04:00
Daniel Micay
0d7799d304
global_heap: inline get_box_size and align_to
2013-06-30 22:41:51 -04:00
Daniel Micay
b731d96b4f
vec: implement exchange vector reserve in Rust
2013-06-30 22:30:37 -04:00
Daniel Micay
80ab877841
global_heap: inline malloc_raw and add realloc_raw
2013-06-30 22:22:52 -04:00
bors
1c48aac9aa
auto merge of #7517 : brson/rust/0.7, r=brson
2013-06-30 17:34:58 -07:00
Jordi Boggiano
3fe05a987c
Move most iter functionality to extra, fixes #7343
2013-07-01 01:50:40 +02:00
Brian Anderson
a766a955a9
Bump version from 0.7-pre to 0.7
2013-06-30 16:36:48 -07:00
bors
040ac2a932
auto merge of #7495 : thestinger/rust/exchange, r=cmr
...
With these changes, exchange allocator headers are never initialized, read or written to. Removing the header will now just involve updating the code in trans using an offset to only do it if the type contained is managed.
The only thing blocking removing the initialization of the last field in the header was ~fn since it uses it to store the dynamic size/types due to captures. I temporarily switched it to a `closure_exchange_alloc` lang item (it uses the same `exchange_free`) and #7496 is filed about removing that.
Since the `exchange_free` call is now inlined all over the codebase, I don't think we should have an assert for null. It doesn't currently ever happen, but it would be fine if we started generating code that did do it. The `exchange_free` function also had a comment declaring that it must not fail, but a regular assert would cause a failure. I also removed the atomic counter because valgrind can already find these leaks, and we have valgrind bots now.
Note that exchange free does not currently print an error an out-of-memory when it aborts, because our `io` code may allocate. We could probably get away with a `#[rust_stack]` call to a `stdio` function but it would be better to make a write system call.
2013-06-30 15:02:05 -07:00
Daniel Micay
4a29d6eb3f
add a closure_exchange_malloc lang item
...
this makes the exchange allocation header completely unused, and leaves
it uninitialized
2013-06-30 16:24:47 -04:00
Daniel Micay
7f3752c7f9
managed: rm RC_EXCHANGE_UNIQUE constant
...
this is no longer used, exchange allocations do not set ref_count
2013-06-30 16:22:58 -04:00
Daniel Micay
408eef0d89
stop initializing ref_count in exchange_alloc
...
this is never read anymore
2013-06-30 16:22:55 -04:00
Alex Crichton
d3155faede
Specialize to_str_common for floats/integers in strconv
...
This allows the integral paths to avoid allocations on the heap
Closes #4424 , #4423
2013-06-30 09:19:25 -07:00
Alex Crichton
8fe6fc11de
Change char::escape_{default,unicode} to take callbacks instead of allocating
...
strings
2013-06-30 09:19:02 -07:00
Huon Wilson
c0a20d2929
Remove vec::{map, mapi, zip_map} and the methods, except for .map, since this
...
is very common, and the replacement (.iter().transform().collect()) is very
ugly.
2013-06-30 21:59:44 +10:00
Huon Wilson
a396e1e2e9
Convert vec::{grow, grow_fn, grow_set} to methods.
2013-06-30 21:17:47 +10:00
Huon Wilson
2eea642c30
Convert vec::dedup to a method.
2013-06-30 21:17:09 +10:00
Huon Wilson
faa8f8ff8b
Convert vec::{bsearch, bsearch_elem} to methods.
2013-06-30 21:15:25 +10:00
Huon Wilson
562dea1820
etc: update etc/unicode.py for the changes made to std::unicode.
2013-06-30 21:15:25 +10:00
Huon Wilson
9e83b2fe55
Convert vec::{reverse, swap} to methods.
2013-06-30 21:15:25 +10:00
Huon Wilson
a890c2cbf1
Convert vec::{rposition, rposition_elem, position_elem, contains} to methods.
2013-06-30 21:15:24 +10:00
Huon Wilson
45940ed988
Remove vec::[r]position_between, replaced by slices & iterators.
2013-06-30 21:06:48 +10:00
Huon Wilson
5d46bcc0e4
Remove vec::{rfind, rfind_between, find_between}, replaced by slices and iterator adapators.
2013-06-30 21:06:47 +10:00
Daniel Micay
350a5c0b72
vec: use contains_managed instead of box header
2013-06-30 03:45:39 -04:00
Daniel Micay
b91416214e
add a contains_managed intrinsic
2013-06-30 03:45:39 -04:00
Daniel Micay
b883d6a54c
simplify the exchange allocator
...
* stop using an atomic counter, this has a significant cost and
valgrind will already catch these leaks
* remove the extra layer of function calls
* remove the assert of non-null in free, freeing null is well defined
but throwing a failure from free will not be
* stop initializing the `prev`/`next` pointers
* abort on out-of-memory, failing won't necessarily work
2013-06-30 03:45:36 -04:00
bors
b4bb36490d
auto merge of #7490 : mozilla/rust/rollup, r=thestinger
...
603137c r=cmr
fe10db2 r=bstrie
2013-06-29 23:34:43 -07:00
Alex Crichton
208eb0f8cb
Implement map_mut
on the Option type
...
Closes #7394
2013-06-29 22:21:37 -07:00
bors
c6b0d4f516
auto merge of #7475 : Seldaek/rust/fixsplit, r=cmr
...
I almost got locked out of my machine because I misunderstood the purpose of the function and called it with a limit of uint::max_value, which turned this function into an almost endless loop.
2013-06-29 21:13:31 -07:00
Daniel Micay
052f28a808
minor vec cleanup
...
* hide the rustrt module in the docs
* remove the useless `traits` module wrapping the `Add` impl
2013-06-29 17:37:03 -04:00
Daniel Micay
d820355213
fix code block syntax in two docstrings
2013-06-29 17:33:18 -04:00
bors
439b13f071
auto merge of #7449 : yichoi/rust/std_test, r=cmr
...
adjust run.rs test for android to pass check std
2013-06-29 14:31:41 -07:00
Alex Crichton
b29c368674
Removing a lot of usage of '&const'
2013-06-29 08:35:48 -07:00
Ben Blum
ff4ab9e147
'Borrow' stack closures rather than copying them (e.g., "|x|f(x)"), in prep for making them noncopyable.
2013-06-29 04:39:34 -04:00
Ben Blum
5784c0912f
Change taskgroup key type to fn:Copy in prep for noncopyable stack closures.
2013-06-29 03:58:50 -04:00
bors
4e78c1e2a8
auto merge of #7479 : mozilla/rust/rollup, r=thestinger
...
22b7eb3 r=thestinger
28a3613 r=cmr
a0c31ec r=bstrie
ee7307e r=thestinger
b9cf6a3 r=thestinger
2013-06-28 22:25:48 -07:00
blake2-ppc
b9cf6a33d2
iterator: UnfoldrIterator::new should have function argument last
...
To match Rust conventions and enable use of `do` etc, make sure the
closure is the last argument to the `new` method.
2013-06-29 01:03:37 -04:00
Brian Anderson
22b7eb3802
Rename #[mutable] to #[no_freeze]
2013-06-29 00:56:36 -04:00
Jordi Boggiano
647b4a6bcd
Optimize str::each_split_within when it is called with large limits
2013-06-29 04:53:52 +02:00
Michael Sullivan
a9e51f5f70
Make default method handling not choke on self region params. Closes #7341 .
2013-06-28 16:12:08 -07:00