Brian Anderson
81dda9d9cb
std: Remove CurrentScheduler spawn mode. Unused
2013-07-30 14:23:46 -07:00
Brian Anderson
08480e4fda
std: Remove ExistingScheduler spawn mode. Unused
2013-07-30 14:23:46 -07:00
Brian Anderson
5d2b8d4372
std: Remove PlatformThread spawn mode. Obsolete
2013-07-30 14:23:45 -07:00
Brian Anderson
85fd75ac47
std: Remove ThreadPerTask spawn mode. Unimplemented
2013-07-30 14:23:45 -07:00
Brian Anderson
cb9ee7f5be
std: Remove ManualThreads spawn mode
2013-07-30 14:23:45 -07:00
Brian Anderson
0144c83213
std::rt: Change Thread interface to require an explicit join
...
Makes it more obvious what's going on
2013-07-30 14:23:44 -07:00
Brian Anderson
7265cc6530
std::rt: Use 2MB stacks
...
Seems to be around the minimum needed by rustc without split stacks
2013-07-30 14:17:56 -07:00
blake2-ppc
8f9014c159
std: Mark the static constants in str.rs as private
...
static variables are pub by default, which is not reflected in our code
(we need to use priv).
2013-07-30 19:34:54 +02:00
Ben Blum
6b75e92afe
UnsafeArc methods return unsafe pointers, so are not themselves unsafe.
2013-07-30 13:19:26 -04:00
Ben Blum
fa8102ab4a
Unkillable is not unsafe. Close #7832 .
2013-07-30 13:19:25 -04:00
Ben Blum
9675cd311a
(cleanup) Fix unimplemented message for kill_all in newsched.
2013-07-30 13:19:25 -04:00
Ben Blum
3f6b4c24ec
Add a better-for-testing optimistic_check() for pipes with cfg(test).
2013-07-30 13:19:25 -04:00
Ben Blum
cccfa8acc4
Add test cases for select
2013-07-30 13:19:25 -04:00
Ben Blum
f34fadd126
Implement select() for new runtime pipes.
2013-07-30 13:19:25 -04:00
blake2-ppc
aa89325cb0
std: Add from_bytes test for utf-8 using codepoints above 0xffff
2013-07-30 19:16:12 +02:00
blake2-ppc
b4ff95599a
std: Deny overlong encodings in UTF-8
...
An 'overlong encoding' is a codepoint encoded non-minimally using the
utf-8 format. Denying these enforce each codepoint to have only one
valid representation in utf-8.
An example is byte sequence 0xE0 0x80 0x80 which could be interpreted as
U+0, but it's an overlong encoding since the canonical form is just
0x00.
Another example is 0xE0 0x80 0xAF which was previously accepted and is
an overlong encoding of the solidus "/". Directory traversal characters
like / and . form the most compelling argument for why this commit is
security critical.
Factor out common UTF-8 decoding expressions as macros. This commit will
partly duplicate UTF-8 decoding, so it is now present in both
fn is_utf8() and .char_range_at(); the latter using an assumption of
a valid str.
2013-07-30 19:16:12 +02:00
blake2-ppc
6dd185930d
std: Disallow bytes 0xC0, 0xC1 (192, 193) in utf-8
...
Bytes 0xC0, 0xC1 can only be used to start 2-byte codepoint encodings,
that are 'overlong encodings' of codepoints below 128.
The reference given in a comment -- https://tools.ietf.org/html/rfc3629
-- does in fact already exclude these bytes, so no additional comment
should be needed in the code.
2013-07-30 17:25:29 +02:00
bors
576f395ddf
auto merge of #8121 : thestinger/rust/offset, r=alexcrichton
...
Closes #8118 , #7136
~~~rust
extern mod extra;
use std::vec;
use std::ptr;
fn bench_from_elem(b: &mut extra::test::BenchHarness) {
do b.iter {
let v: ~[u8] = vec::from_elem(1024, 0u8);
}
}
fn bench_set_memory(b: &mut extra::test::BenchHarness) {
do b.iter {
let mut v: ~[u8] = vec::with_capacity(1024);
unsafe {
let vp = vec::raw::to_mut_ptr(v);
ptr::set_memory(vp, 0, 1024);
vec::raw::set_len(&mut v, 1024);
}
}
}
fn bench_vec_repeat(b: &mut extra::test::BenchHarness) {
do b.iter {
let v: ~[u8] = ~[0u8, ..1024];
}
}
~~~
Before:
test bench_from_elem ... bench: 415 ns/iter (+/- 17)
test bench_set_memory ... bench: 85 ns/iter (+/- 4)
test bench_vec_repeat ... bench: 83 ns/iter (+/- 3)
After:
test bench_from_elem ... bench: 84 ns/iter (+/- 2)
test bench_set_memory ... bench: 84 ns/iter (+/- 5)
test bench_vec_repeat ... bench: 84 ns/iter (+/- 3)
2013-07-30 07:01:19 -07:00
Marvin Löbel
e33fca9ffe
Added str::char_offset_iter() and str::rev_char_offset_iter()
...
Renamed bytes_iter to byte_iter to match other iterators
Refactored str Iterators to use DoubleEnded Iterators and typedefs instead of wrapper structs
Reordered the Iterator section
Whitespace fixup
Moved clunky `each_split_within` function to the one place in the tree where it's actually needed
Replaced all block doccomments in str with line doccomments
2013-07-30 12:55:48 +02:00
Daniel Micay
ef870d37a5
implement pointer arithmetic with GEP
...
Closes #8118 , #7136
~~~rust
extern mod extra;
use std::vec;
use std::ptr;
fn bench_from_elem(b: &mut extra::test::BenchHarness) {
do b.iter {
let v: ~[u8] = vec::from_elem(1024, 0u8);
}
}
fn bench_set_memory(b: &mut extra::test::BenchHarness) {
do b.iter {
let mut v: ~[u8] = vec::with_capacity(1024);
unsafe {
let vp = vec::raw::to_mut_ptr(v);
ptr::set_memory(vp, 0, 1024);
vec::raw::set_len(&mut v, 1024);
}
}
}
fn bench_vec_repeat(b: &mut extra::test::BenchHarness) {
do b.iter {
let v: ~[u8] = ~[0u8, ..1024];
}
}
~~~
Before:
test bench_from_elem ... bench: 415 ns/iter (+/- 17)
test bench_set_memory ... bench: 85 ns/iter (+/- 4)
test bench_vec_repeat ... bench: 83 ns/iter (+/- 3)
After:
test bench_from_elem ... bench: 84 ns/iter (+/- 2)
test bench_set_memory ... bench: 84 ns/iter (+/- 5)
test bench_vec_repeat ... bench: 84 ns/iter (+/- 3)
2013-07-30 02:50:31 -04:00
bors
8695bc74a0
auto merge of #7223 : steveklabnik/rust/vec_initial_docs, r=pcwalton
...
Let's explain more of what this module is about, not just 'vectors.'
2013-07-29 23:49:23 -07:00
blake2-ppc
99490ad5ba
std: Remove macro in vec that's only used once
2013-07-30 02:52:01 +02:00
blake2-ppc
5307d3674e
std: Implement Extendable for hashmap, str and trie
2013-07-30 02:32:38 +02:00
blake2-ppc
2ff84124f0
std: Remove RandomAccessIterator impl for VecMutIterator
...
The RandomAccessIterator implementation is not sound for the mutable vec
iterator, and makes it easy to duplicate &mut element pointers.
2013-07-30 01:48:17 +02:00
blake2-ppc
66fccdb295
std: Tests for RandomAccessIterators
2013-07-30 01:48:17 +02:00
blake2-ppc
630627c3d4
std: Implement RandomAccessIterator for iterator adaptors
...
Implement RAI where possible for iterator adaptors such as Map,
Enumerate, Skip, Take, Zip, Cycle (all of the requiring that the adapted
iterator also implements RAI).
2013-07-30 01:48:17 +02:00
blake2-ppc
5d4af58c1d
iterator: implement size_hint() for FlatMap
2013-07-30 01:48:17 +02:00
blake2-ppc
4b2931c90f
iterator: implement DoubleEndedIterator for FlatMap
2013-07-30 01:48:17 +02:00
Brendan Zabarauskas
4f65fc7ef2
Improve std::num module description, and fix some formatting
2013-07-30 08:59:43 +10:00
Brendan Zabarauskas
b6ea0538a9
Add some missing method wrappers to std::num
2013-07-30 08:58:46 +10:00
bors
bb996bf92e
auto merge of #8090 : blake2-ppc/rust/iterator-adaptor-names, r=pcwalton
...
Drop the "Iterator" suffix for the the structs in std::iterator.
Filter, Zip, Chain etc. are shorter type names for when iterator
pipelines need their types written out in full in return value types, so
it's easier to read and write. the iterator module already forms enough
namespace.
2013-07-29 15:49:18 -07:00
bors
d34016d109
auto merge of #8109 : blake2-ppc/rust/extern-fn-clone, r=thestinger
...
Implement Clone and DeepClone for functions with 0 to 8 arguments. `extern fn()` is implicitly copyable so it's simple, except there is no way to implement it generically over #n function arguments.
Allows deriving of Clone on structs containing `extern "Rust" fn`.
2013-07-29 14:01:24 -07:00
Steve Klabnik
538fbc38c9
Adding an initial description to vec.rs.
...
Let's explain more of what this module is about, not just 'vectors.'
2013-07-29 16:18:41 -04:00
Ben Blum
7326bc879e
Optimize try_recv to not require the two context switches when data is available.
2013-07-29 16:04:16 -04:00
Ben Blum
1137fbd9ab
Remove ChanOneHack/PortOneHack extra allocation
2013-07-29 16:04:16 -04:00
blake2-ppc
11aad20cf8
std: Implement Clone and DeepClone for extern "Rust" fn
...
Implement Clone and DeepClone for functions with 0 to 8 arguments.
2013-07-29 19:43:21 +02:00
bors
8413d4769f
auto merge of #8085 : mrordinaire/rust/percent-p, r=huonw
...
pull request for #8011
2013-07-29 05:40:26 -07:00
Do Nhat Minh
79f1052b19
Added %p directive to fmt!, which expects *T as argument
2013-07-29 20:34:01 +08:00
blake2-ppc
4b45f47881
std: Rename Iterator adaptor types to drop the -Iterator suffix
...
Drop the "Iterator" suffix for the the structs in std::iterator.
Filter, Zip, Chain etc. are shorter type names for when iterator
pipelines need their types written out in full in return value types, so
it's easier to read and write. the iterator module already forms enough
namespace.
2013-07-29 04:20:56 +02:00
blake2-ppc
4849a42bf6
std: Implement FromIterator for ~str
...
FromIterator initially only implemented for Iterator<char>, which is the
type of the main iterator.
2013-07-29 02:40:28 +02:00
jmgrosen
a0f0f3012e
Refactored vec and str iterators to remove prefixes
2013-07-28 13:37:35 -07:00
Stepan Koltsov
b92d1ea723
ReaderUtil::each_byte shouldn't include EOF byte -- Issue #5056
2013-07-28 16:53:00 +04:00
bors
5842ab36b8
auto merge of #8087 : Aatch/rust/atomics, r=huonw
...
Adds a fence operation to close #8061
Also adds static initializers to for atomic types. Since the fields are private, you aren't able to have `static mut` variables that are an atomic type. Each atomic type's initializer starts at a 0-value (so unset for `AtomicFlag` and false for `AtomicBool`).
2013-07-28 03:55:22 -07:00
James Miller
639819f3d9
Fix spelling errors
2013-07-28 20:45:23 +12:00
James Miller
5c7e016700
Add static initializers for atomics
2013-07-28 20:26:49 +12:00
James Miller
4a1a0fbed5
Add an atomic fence intrinsic
2013-07-28 20:26:49 +12:00
bors
20454da2db
auto merge of #8069 : erickt/rust/maikklein, r=erickt
...
Good evening,
This is a superset of @MaikKlein's #7969 commit, that I've fixed up to compile. I had a couple commits I wanted to do on top of @MaikKlein's work that I didn't want to bitrot.
2013-07-28 00:19:21 -07:00
Erick Tryzelaar
b147d70b08
std: cleanup imports in result::tests
2013-07-27 23:42:53 -07:00
Erick Tryzelaar
3478589b99
std and rustc: cleanup uses of result methods
2013-07-27 23:42:53 -07:00
Erick Tryzelaar
ea106f72f7
core: correct the casing of result::{Ok,Err} in the docs
2013-07-27 23:42:53 -07:00
Erick Tryzelaar
796b3371f9
std: Put the option tests into a tests submodule
2013-07-27 23:42:53 -07:00
Erick Tryzelaar
03a16dbb8e
std: fix the casing of option::{Some,None} in the docs
2013-07-27 23:41:10 -07:00
Erick Tryzelaar
2a68c719f4
to_either + fixes
2013-07-27 23:41:09 -07:00
Erick Tryzelaar
aad53cb6e2
cleanup .map and .map_err
2013-07-27 23:41:09 -07:00
maikklein
9dc1de4c9e
cleanup .get and .get_err
2013-07-27 23:41:09 -07:00
maikklein
f6bcf5d5f1
cleanup .chain and .chain_err + fixing other files
2013-07-27 23:41:09 -07:00
Erick Tryzelaar
e308167a2f
cleanup .unwrap and .unwrap_err fixing io tests
2013-07-27 23:41:09 -07:00
Erick Tryzelaar
4eb95f6d1c
cleanup .iter and .iter_err
2013-07-27 23:41:09 -07:00
Erick Tryzelaar
225f1c760d
cleanup get_ref
2013-07-27 23:41:09 -07:00
Steven Stewart-Gallus
39b3a0561f
Fix nits.
2013-07-27 22:06:29 -07:00
Steven Stewart-Gallus
d0b7515aed
Change concurrency primitives to standard naming conventions
...
To be more specific:
`UPPERCASETYPE` was changed to `UppercaseType`
`type_new` was changed to `Type::new`
`type_function(value)` was changed to `value.method()`
2013-07-27 22:06:29 -07:00
bors
3078e83c3f
auto merge of #8076 : omasanori/rust/cleanup, r=huonw
...
A cleanup suggested on #7922 .
2013-07-27 20:13:22 -07:00
bors
82b29ae5a5
auto merge of #7864 : brson/rust/start-on-main-thread, r=brson
...
Applications that need to use the GUI can override start and set up the runtime using
this function.
2013-07-27 18:25:24 -07:00
Brian Anderson
34a27db8bf
std::rt: Add start_on_main_thread function
...
Applications that need to use the GUI can override start and set up the runtime using
this function.
2013-07-27 17:36:14 -07:00
bors
b027c5fce3
auto merge of #8074 : thestinger/rust/iterator, r=cmr
...
d7c9bb4
r=alexcrichton
7ae17e0
r=huonw
2013-07-27 16:37:27 -07:00
Daniel Micay
fe955e7b06
iterator: add an Extendable trait
2013-07-27 17:42:10 -04:00
Daniel Micay
ffe549daf5
vec: replace some as_mut_buf
with to_mut_ptr
2013-07-27 17:30:29 -04:00
blake2-ppc
7ae17e0964
Remove dummy type parameters from iterator adaptors
...
With the recent fixes to method resolution, we can now remove the
dummy type parameters used as crutches in the iterator module.
For example, the zip adaptor type is just ZipIterator<T, U> now.
2013-07-27 14:37:55 -04:00
Daniel Micay
d7c9bb4b68
vec: add mut_slice_{to,from}
...
Closes #8066
2013-07-27 14:36:52 -04:00
Daniel Micay
d6bc438bbc
make RandomAccessIterator inherit from Iterator
2013-07-27 14:36:52 -04:00
bors
5157e05049
auto merge of #8036 : sfackler/rust/container-impls, r=msullivan
...
A couple of implementations of Container::is_empty weren't exactly
self.len() == 0 so I left them alone (e.g. Treemap).
2013-07-27 11:16:31 -07:00
bors
15310ba7c2
auto merge of #8040 : luqmana/rust/rtn, r=brson
...
Implements various missing tcp & udp methods.. Also fixes handling ipv4-mapped/compatible ipv6 addresses and addresses the XXX on `status_to_maybe_uv_error`.
r? @brson
2013-07-27 01:49:35 -07:00
OGINO Masanori
8d654fc41d
Remove unnecessary #[path = "***/mod.rs"] lines.
...
Fixes #7922 .
Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2013-07-27 15:53:30 +09:00
bors
4989799799
auto merge of #7986 : alexcrichton/rust/raw-repr, r=brson
...
This moves the raw struct layout of closures, vectors, boxes, and strings into a
new `unstable::raw` module. This is meant to be a centralized location to find
information for the layout of these values.
As safe method, `unwrap`, is provided to convert a rust value to its raw
representation. Unsafe methods to convert back are not provided because they are
rarely used and too numerous to write an implementation for each (not much of a
common pattern).
This is progress on #6790 . I tried to get a nice interface for a trait to implement in the raw module, but I was unable to come up with one. The hard part is that there are so many different directions to go from one way to another that it's difficult to find a pattern to follow to implement a trait with. Someone else might have some better luck though.
2013-07-26 19:46:36 -07:00
Alex Crichton
5aaaca0c6a
Consolidate raw representations of rust values
...
This moves the raw struct layout of closures, vectors, boxes, and strings into a
new `unstable::raw` module. This is meant to be a centralized location to find
information for the layout of these values.
As safe method, `repr`, is provided to convert a rust value to its raw
representation. Unsafe methods to convert back are not provided because they are
rarely used and too numerous to write an implementation for each (not much of a
common pattern).
2013-07-26 09:53:03 -07:00
bors
15ab6fde7f
auto merge of #8039 : Xazax-hun/rust/master, r=brson
...
Added some more atomic operations. https://github.com/mozilla/rust/issues/7421
2013-07-26 08:02:06 -07:00
Luqman Aden
df67942dcc
libstd: Tests for {peer, socket}_name.
2013-07-26 05:02:53 -04:00
Luqman Aden
037bf3757c
libstd: Implement some missing udp methods.
2013-07-25 22:21:46 -04:00
Luqman Aden
a5c6b85091
libstd: Implement some missing tcp methods.
2013-07-25 19:42:19 -04:00
Luqman Aden
005ea3b173
libstd: Add ToStr impl for IpAddr.
2013-07-25 18:27:18 -04:00
Steven Fackler
feb18fe8da
Added default impls for container methods
...
A couple of implementations of Container::is_empty weren't exactly
self.len() == 0 so I left them alone (e.g. Treemap).
2013-07-25 15:17:30 -07:00
bors
0012b5008b
auto merge of #8030 : thestinger/rust/iterator, r=huonw
2013-07-25 13:49:43 -07:00
Luqman Aden
d6e1a6b237
libstd: Get rid of duplication in {peer, socket}_name and remove extra *.
2013-07-25 15:50:19 -04:00
bors
4cf30729f0
auto merge of #8026 : poiru/rust/issue-8024, r=alexcrichton
...
Closes #8024 .
2013-07-25 05:22:44 -07:00
bors
906264b50f
auto merge of #8015 : msullivan/rust/default-methods, r=nikomatsakis
...
Lots of changes to vtable resolution, handling of super/self method calls in default methods. Fix a lot of trait inheritance bugs.
r? @nikomatsakis
2013-07-25 03:07:44 -07:00
Luqman Aden
e2bb32bea1
libstd: Handle IPv4-Mapped/Compatible IPv6 addresses.
2013-07-25 05:57:52 -04:00
Luqman Aden
ac40d5323d
libstd: Fix errors when rtdebug! is not a noop.
2013-07-25 05:57:52 -04:00
Luqman Aden
61e741cf71
libstd: Implement {peer, socket}_name for new rt tcp & udp.
2013-07-25 05:57:52 -04:00
Gábor Horváth
7cc8f4bae0
Added some more atomic operations.
2013-07-25 10:46:31 +02:00
Alex Crichton
7fd23e4fe2
Convert uses of transmute which don't need it
2013-07-24 23:12:28 -07:00
bors
467d381d3a
auto merge of #7931 : blake2-ppc/rust/chain-mut-ref, r=pcwalton
...
First, clean up the uses of "None" and "Some" to always use consistent title case matching the variant names.
Add .chain_mut_ref() which is a missing method. A use case example for this method is extraction of an optional value from an Option\<Container\> value.
2013-07-24 19:25:38 -07:00
Daniel Micay
4517e39125
rm default method lint
...
default methods are enabled by default, so there's not much point in
keeping around a lint to report them as being experimental
2013-07-24 18:44:16 -04:00
bors
330378d1a1
auto merge of #7996 : erickt/rust/cleanup-strs, r=erickt
...
This is a cleanup pull request that does:
* removes `os::as_c_charp`
* moves `str::as_buf` and `str::as_c_str` into `StrSlice`
* converts some functions from `StrSlice::as_buf` to `StrSlice::as_c_str`
* renames `StrSlice::as_buf` to `StrSlice::as_imm_buf` (and adds `StrSlice::as_mut_buf` to match `vec.rs`.
* renames `UniqueStr::as_bytes_with_null_consume` to `UniqueStr::to_bytes`
* and other misc cleanups and minor optimizations
2013-07-24 13:25:36 -07:00
Birunthan Mohanathas
f73bb2bfe6
Implement std::num::Zero for bool
...
Closes #8024 .
2013-07-24 22:54:32 +03:00
Erick Tryzelaar
9a950802ed
std: str.as_bytes_with_null_consume() => str.to_bytes_with_null()
2013-07-24 12:33:49 -07:00
bors
f132401a0b
auto merge of #7982 : thestinger/rust/iterator, r=thestinger
...
f0f4dcc r=huonw
25e9c4c r=graydon
a87c2d1 r=brson
16f369d r=cmr
9f05cc8 r=bstrie
e858055 r=huonw
5d80938 r=thestinger
05d03e7 r=cmr
8f86fa3
r=thestinger
2013-07-24 08:52:36 -07:00
Daniel Micay
4a2d22bdb1
fix compilation on macos/windows
2013-07-24 09:45:21 -04:00
Stepan Koltsov
c50d3e3fca
ToStr for HashMap does not need value to implement Eq or Hash
2013-07-24 09:45:21 -04:00
Brian Anderson
6c88e46d4d
std:rt: args module is not used by win/mac. #7951
2013-07-24 09:45:20 -04:00
Birunthan Mohanathas
d047cf1ec6
Change 'print(fmt!(...))' to printf!/printfln! in src/lib*
2013-07-24 09:45:20 -04:00
Daniel Micay
626bb5a866
add a RandomAccessIterator trait
2013-07-24 09:45:20 -04:00
bors
51028532d7
auto merge of #7993 : Xazax-hun/rust/master, r=bblum
...
Added missing memory orderings for atomic types. https://github.com/mozilla/rust/issues/7422
2013-07-24 06:37:36 -07:00
bors
7f96eb58d2
auto merge of #7980 : graydon/rust/misc-benchmarks, r=catamorphism
...
Some machinery for enabling #[bench] benchmarks in std and some examples showing how to write them.
2013-07-23 22:46:39 -07:00
Michael Sullivan
a0f8540c95
Fix some impls such that all supertraits are actually implemented.
2013-07-23 17:06:32 -07:00
Michael Sullivan
4b9759e20f
Add a to_owned_vec method to IteratorUtil.
2013-07-23 17:06:32 -07:00
Erick Tryzelaar
9c3679a9a2
std: make str::append move self
...
This eliminates a copy and fixes a FIXME.
2013-07-23 16:57:00 -07:00
Erick Tryzelaar
bbedbc0450
std: inline str::with_capacity and vec::with_capacity
2013-07-23 16:57:00 -07:00
Erick Tryzelaar
cced3c9013
std: simplify str::as_imm_buf and vec::as_{imm,mut}_buf
2013-07-23 16:57:00 -07:00
Erick Tryzelaar
037a5b1af4
str: move as_mut_buf into OwnedStr, and make it self
2013-07-23 16:56:58 -07:00
Erick Tryzelaar
2dd3c44a56
std: remove a malloc from os::fill_charp_buf
2013-07-23 16:56:23 -07:00
Erick Tryzelaar
31b77aecfc
std: remove str::to_owned and str::raw::slice_bytes_owned
2013-07-23 16:56:23 -07:00
Erick Tryzelaar
cc9666f68f
std: rename str.as_buf to as_imm_buf, add str.as_mut_buf
2013-07-23 16:56:22 -07:00
Erick Tryzelaar
3b818edeba
std and extra: use as_c_str instead of as_buf in a couple places
...
These uses are assuming the strings are null terminated, so it
should be using `as_c_str` instead of `as_buf`
2013-07-23 16:56:22 -07:00
Erick Tryzelaar
cf75330807
std: add test for str::as_c_str
2013-07-23 16:56:22 -07:00
Erick Tryzelaar
7af56bb921
std: move StrUtil::as_c_str into StrSlice
2013-07-23 16:56:22 -07:00
Erick Tryzelaar
9fdec67a67
std: move str::as_buf into StrSlice
2013-07-23 16:56:22 -07:00
Erick Tryzelaar
cfd89c4075
std: remove os::as_c_charp
2013-07-23 16:56:22 -07:00
Erick Tryzelaar
9ad815e063
std: rename str.as_bytes_with_null_consume to str.to_bytes_with_null
2013-07-23 16:56:17 -07:00
Graydon Hoare
978e5d94bc
std: wrap "long" utf8 lines.
2013-07-23 16:02:14 -07:00
Gábor Horváth
1ce14116cc
Added missing memory orderings for atomic types.
2013-07-23 12:34:40 +02:00
bors
0a5d1a1b81
auto merge of #7875 : sstewartgallus/rust/fubar, r=alexcrichton
2013-07-22 23:13:41 -07:00
bors
ff34064aa3
auto merge of #7916 : olsonjeffery/rust/newrt_timer, r=brson
...
My first bit of newsched IO work. Pretty simple and limited in scope.
the RtioTimer trait only has a `sleep(msecs: u64)` method, for now. Taking requests on what else ought to be here.
oh yeah: this resolves #6435
2013-07-22 17:28:35 -07:00
Graydon Hoare
d9c0634536
std: various additional language benchmarks in util.
2013-07-22 16:56:11 -07:00
Graydon Hoare
ca5ed4cc49
std: add benchmark for allocating-and-dropping a struct with a dtor.
2013-07-22 16:56:11 -07:00
Graydon Hoare
9f7e364d3a
std: add #[bench] benchmarks for num::strconv
2013-07-22 16:56:11 -07:00
Graydon Hoare
d9776236c8
std: add #[bench] benchmarks for rand.
2013-07-22 16:56:10 -07:00
Graydon Hoare
3d5fb470fb
std: add #[bench] benchmarks for global and local heaps.
2013-07-22 16:56:10 -07:00
Graydon Hoare
e5cbede103
std: add preliminary str benchmark.
2013-07-22 16:56:10 -07:00
Graydon Hoare
786318f61b
std: add #[cfg(test)] reference to extra so we can benchmark libstd.
2013-07-22 16:56:10 -07:00
bors
73921f91a3
auto merge of #7883 : brson/rust/rm-std-net, r=graydon
...
This removes all the code from libextra that depends on libuv. After that it removes three runtime features that existed to support the global uv loop: weak tasks, runtime-global variables, and at_exit handlers.
The networking code doesn't have many users besides servo, so shouldn't have much fallout. The timer code though is useful and will probably break out-of-tree code until the new scheduler lands, but I expect that to be soon.
It also incidentally moves `os::change_dir_locked` to `std::unstable`. This is a function used by test cases to avoid cwd races and in my opinion shouldn't be public (#7870 ).
Closes #7251 and #7870
2013-07-22 15:40:36 -07:00
Jeff Olson
3169bb70d8
std: fix for blocked task resume
2013-07-22 15:28:32 -07:00
Brian Anderson
407bffb33e
std: Remove at_exit API. Unused
2013-07-22 14:17:09 -07:00
Brian Anderson
23b7ee2bda
std: Remove unstable::global. Unused
2013-07-22 14:16:52 -07:00
Brian Anderson
6174f9a4d9
std: Move change_dir_locked to unstable. #7870
2013-07-22 14:16:52 -07:00
Brian Anderson
4beda4e582
std::rt: Stop using unstable::global in change_dir_locked
2013-07-22 14:16:52 -07:00
Brian Anderson
f8c4d99df6
std: Remove weak_task API. Unused
2013-07-22 14:16:52 -07:00
bors
9ed82fbb43
auto merge of #7943 : Dretch/rust/vec-slice-from-to, r=huonw
2013-07-22 13:49:34 -07:00
Jeff Olson
73ab6c60f3
std: make check appeasement
2013-07-22 13:19:05 -07:00
Jeff Olson
155470fc9c
std: minor timer cleanup based on feedback
2013-07-22 13:19:04 -07:00
Jeff Olson
5da29e3278
std: add rt::io::Timer
2013-07-22 13:19:04 -07:00
Jeff Olson
921d99108c
std: add RtioTimer and UvTimer impl atop rt::uv
2013-07-22 13:19:04 -07:00
bors
2f7d86f9a8
auto merge of #7942 : Dretch/rust/os-listdir-path-no-squiggle, r=brson
2013-07-22 12:01:41 -07:00
Daniel Micay
ed67cdb73c
new snapshot
2013-07-22 01:09:48 -04:00
Steven Stewart-Gallus
a8870dfbb5
Minor cleanup of hashmap
2013-07-21 20:10:55 -07:00
Daniel Micay
fc05819181
Merge pull request #7936 from thestinger/cleanup
...
rm obsolete no-op lints
2013-07-21 20:04:15 -07:00
bors
fe3f75ff8e
auto merge of #7932 : blake2-ppc/rust/str-clear, r=huonw
...
~str and @str need separate implementations for use in generic
functions, where it will not automatically use the impl on &str.
fixes issue #7900
2013-07-21 15:28:38 -07:00
Gareth Smith
a6263694ff
Remove what appears to be redundant indirection from
...
os::list_dir_path.
2013-07-21 18:33:29 +01:00
Gareth Smith
30f13e661a
Add slice_from and slice_to methods for vec, like the
...
methods of the same names that already exist for strs.
2013-07-21 14:39:01 +01:00
bors
8476419fef
auto merge of #7896 : pcwalton/rust/pub-extern, r=pcwalton
...
r? @nikomatsakis
2013-07-20 18:40:39 -07:00
Patrick Walton
06594ed96b
librustc: Remove pub extern
and priv extern
from the language.
...
Place `pub` or `priv` on individual items instead.
2013-07-20 17:39:38 -07:00