summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2013-07-11Optimize is_utf8Gary Linscott-8/+16
Manually unroll the multibyte loops, and optimize for the single byte chars.
2013-07-11char_range_at perf workGary Linscott-28/+60
Moves multibyte code to it's own function to make char_range_at easier to inline, and faster for single and multibyte chars. Benchmarked reading example.json 100 times, 1.18s before, 1.08s after.
2013-07-11Fix #5270: another test I did not update properly.Felix S. Klock II-2/+2
2013-07-11auto merge of #7708 : bcully/rust/warnings, r=thestingerbors-1/+3
Just getting my feet wet.
2013-07-11auto merge of #7693 : korenchkin/rust/fixdoc_rand, r=cmrbors-19/+31
All of the examples were still using `core::` instead of `std::` and needed a `use std::rand;` at the top to compile Most of the examples had `rng = rand::rng();` instead of `let mut rng = rand::rng();`
2013-07-11Remove all external requirements of `@` from TLSAlex Crichton-16/+16
Closes #6004
2013-07-11Fix a soundness problem with `get`Alex Crichton-31/+79
2013-07-11Work around stage0 to remove '@' requirements from TLSAlex Crichton-75/+334
2013-07-10auto merge of #7691 : nikomatsakis/rust/vec-split-method, r=thestingerbors-1/+37
I don't think we have this yet. This makes `&mut [T]` much more flexible. r? @strcat (or whomever)
2013-07-11vec: rm inline(never) hackDaniel Micay-13/+2
just avoid giving an inline hint in the first place
2013-07-11iterator: add DoubleEndedIterator conceptDaniel Micay-41/+85
This implements the trait for vector iterators, replacing the reverse iterator types. The methods will stay, for implementing the future reverse Iterable traits and convenience. This can also be trivially implemented for circular buffers and other variants of arrays like strings and `SmallIntMap`/`SmallIntSet`. The `DoubleEndedIterator` trait will allow for implementing algorithms like in-place reverse on generic mutable iterators. The naming (`Range` vs. `Iterator`, `Bidirectional` vs. `DoubleEnded`) can be bikeshedded in the future.
2013-07-10remove unused importsBrendan Cully-1/+3
2013-07-10auto merge of #7690 : kevinmehall/rust/document-c_void, r=huonwbors-0/+7
I added documentation for when to use and not to use `c_void`, since it tripped me up when I started. (See issue #7627)
2013-07-10auto merge of #7683 : alexcrichton/rust/issue-7625, r=thestingerbors-2/+8
Closes #7625
2013-07-10Add a `mut_split()` method for dividing one `&mut [T]` into twoNiko Matsakis-1/+37
2013-07-10Fixed exampleskorenchkin-19/+31
The examples were still using `core::` instead of `std::` All of the examples needed a `use std::rand;` at the top to compile Most of the examples had `rng = rand::rng();` instead of `let mut rng = rand::rng();`
2013-07-10Document std::libc::c_void.Kevin Mehall-0/+7
2013-07-10Added overloaded Add and Sub traits for pointer arithmetic=Mark Sinclair-0/+96
Implemented ptr arithmetic for *T and *mut T. Tests passing
2013-07-10Merge pull request #7682 from thestinger/vecDaniel Micay-7/+26
vec::with_capacity: do one alloc for non-managed + ptr module improvements
2013-07-10Switch over to new range_rev semantics; fix #5270.Felix S. Klock II-8/+10
2013-07-10Refactored int/uint range code in preparation for change to range_rev semantics.Felix S. Klock II-33/+148
Also added unit tests of range code to test refactoring. The num-range-rev.rs test will need to be updated when the range_rev semantics change.
2013-07-10Don't loop infinitely on 0-size structs in reprAlex Crichton-2/+8
Closes #7625
2013-07-09ptr: optimize {swap,replace,read}_ptrDaniel Micay-6/+6
2013-07-09vec::with_capacity: do one alloc for non-managedDaniel Micay-1/+20
2013-07-09auto merge of #7265 : brson/rust/io-upstream, r=brsonbors-2033/+5384
r? @graydon, @nikomatsakis, @pcwalton, or @catamorphism Sorry this is so huge, but it's been accumulating for about a month. There's lots of stuff here, mostly oriented toward enabling multithreaded scheduling and improving compatibility between the old and new runtimes. Adds task pinning so that we can create the 'platform thread' in servo. [Here](https://github.com/brson/rust/blob/e1555f9b5628af2b6c6ed344cad621399cb7684d/src/libstd/rt/mod.rs#L201) is the current runtime setup code. About half of this has already been reviewed.
2013-07-09std: Remove ThreadPerCore spawn mode. UnusedBrian Anderson-21/+1
2013-07-09Rename local_data methods/types for less keystrokesAlex Crichton-66/+76
2013-07-09Change TLS to almost be able to contain owned typesAlex Crichton-87/+145
2013-07-09Change the elements in the task-local map to be actual key-value pairsAlex Crichton-127/+111
2013-07-09Use purely an owned vector for storing TLS dataAlex Crichton-47/+36
2013-07-09std::rt: Ignore 0-byte udp readsBrian Anderson-0/+7
2013-07-09std::rt: Do local tests in a bare thread to not interfere with the schedulerBrian Anderson-21/+30
2013-07-09auto merge of #7657 : thestinger/rust/rollup, r=thestingerbors-3/+78
d3be8ab r=brson 05eb3cf r=thestinger c80f4e1 r=huonw 8c27af1 r=huonw 0eee0b6 r=cmr ea2756a r=thestinger
2013-07-09Fix typo in docs for MutableCloneableVectorKevin Ballard-1/+1
2013-07-09Impl Not for boolBrendan Zabarauskas-0/+25
2013-07-09std: Implement `Iterator::size_hint` method for `Option` iteratorsAndrew Paseltiner-0/+50
2013-07-09remove the unused exchange_malloc `align` parameterDaniel Micay-2/+2
`malloc` already returns memory correctly aligned for every possible type in standard C, and that's enough for all types in Rust too
2013-07-09auto merge of #7117 : jensnockert/rust/freestanding, r=cmrbors-283/+105
The free-standing functions in f32, f64, i8, i16, i32, i64, u8, u16, u32, u64, float, int, and uint are replaced with generic functions in num instead. This means that instead of having to know everywhere what the type is, like ~~~ f64::sin(x) ~~~ You can simply write code that uses the type-generic versions in num instead, this works for all types that implement the corresponding trait in num. ~~~ num::sin(x) ~~~ Note 1: If you were previously using any of those functions, just replace them with the corresponding function with the same name in num. Note 2: If you were using a function that corresponds to an operator, use the operator instead. Note 3: This is just https://github.com/mozilla/rust/pull/7090 reopened against master.
2013-07-09std: Make os::set_exit_status work with newschedBrian Anderson-3/+40
2013-07-09std::rt: size_t, not u64Brian Anderson-2/+2
2013-07-09auto merge of #7528 : indutny/rust/feature/memory-api, r=cmrbors-9/+829
@cmr this is still WIP and I haven't tested it on windows, but anyway.
2013-07-09os: introduce cross-platform MemoryMap bindingsFedor Indutny-4/+358
Basically, one may just do: MemoryMap::new(16, ~[ MapExecutable, MapReadable, MapWritable ]) And executable+readable+writable chunk of at least 16 bytes size will be allocated and freed with the result of `MemoryMap::new`.
2013-07-08auto merge of #7578 : alexcrichton/rust/overflow, r=thestingerbors-1/+14
This should never cause a segfault, but rather fail somehow. Possibly a condition could be used here, but for now there's not much else to do.
2013-07-08auto merge of #7262 : nikomatsakis/rust/ref-bindings-in-irrefut-patterns, ↵bors-49/+159
r=catamorphism Correct treatment of irrefutable patterns. The old code was wrong in many, many ways. `ref` bindings didn't work, it sometimes copied when it should have moved, the borrow checker didn't even look at such patterns at all, we weren't consistent about preventing values with destructors from being pulled apart, etc. Fixes #3224. Fixes #3225. Fixes #3255. Fixes #6225. Fixes #6386. r? @catamorphism
2013-07-08std: Add a yield implementation for newschedBrian Anderson-4/+19
2013-07-08TidyBrian Anderson-14/+16
2013-07-08Merge remote-tracking branch 'mozilla/master'Brian Anderson-1341/+1018
Conflicts: src/libextra/test.rs src/libstd/rt/global_heap.rs src/libstd/unstable/lang.rs src/libstd/vec.rs
2013-07-08auto merge of #7612 : thestinger/rust/utf8, r=huonwbors-22/+2
2013-07-08Merge remote-tracking branch 'anasazi/io'Brian Anderson-686/+1512
Conflicts: src/libstd/rt/test.rs
2013-07-08std::rt: Add a hack to allocate different test port ranges to different botsBrian Anderson-2/+44