summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2013-11-12io: benchmarks for creation of the various Buffered objectsCorey Richardson-0/+42
2013-11-12auto merge of #10423 : alexcrichton/rust/move-io, r=pcwaltonbors-141/+152
I still plan on reorganizing the internals of the IO module a bit, but this is the major move which has been on the horizon for awhile.
2013-11-12auto merge of #10435 : jayanderson/rust/docs, r=huonwbors-2/+131
This fills in some missing docs in the nums package. Let me know if this is on the right track for what's wanted for docs. I can probably fill in more in the future. Thanks. (As a side note the precedence of the unary negative operator '-' tripped me up for a bit. Essentially I would expect `-25.0f32.sqrt()` to result in NaN instead of `-5.0`.)
2013-11-11Move std::rt::io to std::ioAlex Crichton-141/+152
2013-11-11Use constants instead of raw values.Jay Anderson-4/+2
2013-11-11auto merge of #10424 : alexcrichton/rust/optimize-buffered, r=brsonbors-2/+13
I was benchmarking rust-http recently, and I saw that 50% of its time was spent creating buffered readers/writers. Albeit rust-http wasn't using std::rt::io::buffered, but the same idea applies here. It's much cheaper to malloc a large region and not initialize it than to set it all to 0. Buffered readers/writers never use uninitialized data, and their internal buffers are encapsulated, so any usage of uninitialized slots are an implementation bug in the readers/writers.
2013-11-11Got directions backwards in to_degrees and to_radians docs.Jay Anderson-2/+2
2013-11-11Add docs for traits Exponential, Hyperbolic, BitCount.Jay Anderson-2/+44
2013-11-11Update docs for Fractional, Algebraic, Round, and Trigonometric traits.Jay Anderson-0/+89
2013-11-12Implemented a ProcessExit enum and helper methods to std::rt::io::process ↵Matthew Iselin-16/+56
for getting process termination status, or the signal that terminated a process. A test has been added to rtio-processes.rs to ensure signal termination is picked up correctly.
2013-11-11auto merge of #10407 : alexcrichton/rust/no-fixed-stack-segment, r=brsonbors-230/+42
The commit messages have more details, but this removes all analysis and usage related to fixed_stack_segment and rust_stack attributes. It's now the assumption that we always have "enough stack" and we'll implement detection of stack overflow through other means. The stack overflow detection is currently implemented for rust functions, but it is unimplemented for C functions (we still don't have guard pages).
2013-11-11Decrease the default stack size back to 2MBAlex Crichton-1/+1
I increased this to 4MB when I implemented abort-on-stack-overflow for Rust functions. Now that the fixed_stack_segment attribute is removed, no rust function will ever reasonably request 2MB of stack (due to calling an FFI function). The default size of 2MB should be plenty for everyday use-cases, and tasks can still request more stack via the spawning API.
2013-11-11Remove #[fixed_stack_segment] and #[rust_stack]Alex Crichton-229/+41
These two attributes are no longer useful now that Rust has decided to leave segmented stacks behind. It is assumed that the rust task's stack is always large enough to make an FFI call (due to the stack being very large). There's always the case of stack overflow, however, to consider. This does not change the behavior of stack overflow in Rust. This is still normally triggered by the __morestack function and aborts the whole process. C stack overflow will continue to corrupt the stack, however (as it did before this commit as well). The future improvement of a guard page at the end of every rust stack is still unimplemented and is intended to be the mechanism through which we attempt to detect C stack overflow. Closes #8822 Closes #10155
2013-11-11Optimize creation of buffered readers/writersAlex Crichton-2/+13
I was benchmarking rust-http recently, and I saw that 50% of its time was spent creating buffered readers/writers. Albeit rust-http wasn't using std::rt::io::buffered, but the same idea applies here. It's much cheaper to malloc a large region and not initialize it than to set it all to 0. Buffered readers/writers never use uninitialized data, and their internal buffers are encapsulated, so any usage of uninitialized slots are an implementation bug in the readers/writers.
2013-11-11auto merge of #10417 : cmr/rust/vec_overflow, r=huonwbors-1/+5
Fixes #10271
2013-11-11auto merge of #10409 : alexcrichton/rust/issue-10386, r=brsonbors-1/+5
Turns out the pipe names must have special names on windows. Once we have special names, all the tests pass just fine. Closes #10386
2013-11-11auto merge of #10394 : yichoi/rust/make_check_pass_android, r=brsonbors-102/+12
To enable test on android bot #9120 some tests are disabled and can be fixed further.
2013-11-11Fix path parsingSeo Sanghyeon-1/+1
2013-11-11Implement `size_hint` for RangeCorey Richardson-8/+80
Closes #8606
2013-11-11vec: with_capacity: check for overflowCorey Richardson-1/+5
Fixes #10271
2013-11-11Clean lint on test buildCorey Richardson-2/+0
2013-11-10auto merge of #10408 : alexcrichton/rust/snapshots, r=huonwbors-188/+12
Mostly just using the `system` abi where possible.
2013-11-10Enable uv pipe tests on windowsAlex Crichton-1/+5
Turns out the pipe names must have special names on windows. Once we have special names, all the tests pass just fine. Closes #10386
2013-11-10Register new snapshotsAlex Crichton-188/+12
2013-11-10auto merge of #10406 : alexcrichton/rust/issue-10405, r=huonwbors-1/+0
The logging macros all use libuv-based I/O, and there was one stray debug statement in task::spawn which was executing before the I/O context was ready. Remove it and add a test to make sure that we can continue to debug this sort of code. Closes #10405
2013-11-10Remove a debug! statement before I/O is readyAlex Crichton-1/+0
The logging macros all use libuv-based I/O, and there was one stray debug statement in task::spawn which was executing before the I/O context was ready. Remove it and add a test to make sure that we can continue to debug this sort of code. Closes #10405
2013-11-10Fix usage of libuv for windowsAlex Crichton-7/+13
2013-11-10Another round of test fixes from previous commitsAlex Crichton-26/+25
2013-11-10Fall back from uv tty instances more aggressivelyAlex Crichton-5/+2
It appears that uv's support for interacting with a stdio stream as a tty when it's actually a pipe is pretty problematic. To get around this, promote a check to see if the stream is a tty to the top of the tty constructor, and bail out quickly if it's not identified as a tty. Closes #10237
2013-11-10Assorted test fixes and merge conflictsAlex Crichton-4/+5
2013-11-10Rework the idle callback to have a safer interfaceAlex Crichton-21/+11
It turns out that the uv implementation would cause use-after-free if the idle callback was used after the call to `close`, and additionally nothing would ever really work that well if `start()` were called twice. To change this, the `start` and `close` methods were removed in favor of specifying the callback at creation, and allowing destruction to take care of closing the watcher.
2013-11-10Add bindings to uv's utime functionAlex Crichton-4/+47
This exposes the ability to change the modification and access times on a file. Closes #10266
2013-11-10Clean up the remaining chunks of uvAlex Crichton-21/+23
2013-11-10Start migrating stream I/O away from ~fn()Alex Crichton-2/+0
2013-11-10Remove usage of ~fn from the schedulerAlex Crichton-3/+2
2013-11-10Remove usage of ~fn() from uv async/idleAlex Crichton-18/+31
2013-11-10temporarily disable tests on android and tagging issue number #10380Young-il Choi-99/+7
2013-11-10temporarily disable tests on android and tagging issue number #10379Young-il Choi-0/+1
2013-11-10temporarily disable tests on android and tagging issue number #10378Young-il Choi-3/+3
2013-11-10disable tests on android since tcp/ip permission cannot be acquired without ↵Young-il Choi-0/+1
help of apk
2013-11-09auto merge of #10153 : ↵bors-1/+12
nikomatsakis/rust/issue-4846-multiple-lifetime-parameters-7, r=pnkfelix Fully support multiple lifetime parameters on types and elsewhere, removing special treatment for `'self`. I am submitting this a touch early in that I plan to push a new commit with more tests specifically targeting types with multiple lifetime parameters -- but the current code bootstraps and passes `make check`. Fixes #4846
2013-11-09auto merge of #10368 : tautologico/rust/default_pkgid, r=catamorphismbors-0/+1
This Fixes #10265 and paves the way for fixing #9543. It works by adding a 'package_id' attribute by default for library crates that don't specify it. This is necessary to use the 'extern mod foo = "bar"' form instead of 'extern mod foo(name="bar") (as per #9543), because the former adds a required package_id when trying to link with the bar crate. I added a simple test to ensure that the default package_id value is being generated, and also added an explicit package_id in the link attribute in all rust libs to avoid getting warnings about default package_id values when building rust.
2013-11-09auto merge of #10359 : tomassedovic/rust/typeid-iterbytes, r=pcwaltonbors-0/+15
I'm not sure this is something you're interested in, but I was playing around the Any trait a bit and I wanted to try it as a key in a HashMap. To do that, TypeId needs to implement IterBytes.
2013-11-08auto merge of #10358 : cmr/rust/mmap++, r=alexcrichtonbors-3/+49
2013-11-09std: os: Document MemoryMapCorey Richardson-3/+49
2013-11-08make DeepClone inherit from CloneDaniel Micay-1/+1
2013-11-08add `clone_from` and `deep_clone_from`Daniel Micay-2/+70
Closes #10240
2013-11-08Generalize AST and ty::Generics to accept multiple lifetimes.Niko Matsakis-1/+12
2013-11-08Implement IterBytes for TypeIdTomas Sedovic-0/+15
2013-11-08Specify package_id for rust libs, to avoid spurious warningsAndrei Formiga-0/+1