about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2013-05-30Add example for uint::range_step.Steve Klabnik-3/+12
2013-05-30core::rt: deny(unused_imports, unused_mut, unused_variable)Brian Anderson-22/+11
2013-05-30Remove unnecessary 'use' formsDaniel Farina-20/+13
Fix a laundry list of warnings involving unused imports that glutted up compilation output. There are more, but there seems to be some false positives (where 'remedy' appears to break the build), but this particular set of fixes seems safe.
2013-05-30Remove copy bindings from patterns.Niko Matsakis-23/+23
2013-05-30Remove a bunch of unnecessary allocations and copiesBjörn Steinbrink-3/+2
2013-05-30core::rt: Fix two multithreading bugs and add a threadring testBrian Anderson-2/+66
This properly distributes the load now
2013-05-30core::rt: Begin recording scheduler metricsBrian Anderson-8/+123
2013-05-30libextra: Require documentation by defaultAlex Crichton-0/+2
2013-05-30Require documentation by default for libstdAlex Crichton-69/+699
Adds documentation for various things that I understand. Adds #[allow(missing_doc)] for lots of things that I don't understand.
2013-05-29core::rt: Add some notes about optimizationsBrian Anderson-0/+14
2013-05-29librustc: Stop reexporting the standard modules from prelude.Patrick Walton-111/+162
2013-05-29librustc: Redo the unsafe checker and make unsafe methods not callable from ↵Patrick Walton-43/+61
safe code
2013-05-29Merge remote-tracking branch 'brson/io' into incomingBrian Anderson-200/+816
Conflicts: src/libstd/rt/sched.rs
2013-05-29auto merge of #6803 : Thiez/rust/native_fmax_fmin, r=brsonbors-4/+19
Calls to the libc versions of fmin and fmax were relatively slow (perhaps because they could not be inlined?). This pull request provides f32 and f64 with fmin and fmax written in Rust, and shows a significant speed increase on my system; I used https://github.com/thiez/rustray as my benchmark, with --opt-level 3 it brings the ray-tracing time down from 10.8 seconds to about 9.2, which seemed significant to me. r?
2013-05-29Changed to a more efficient implementation.Matthijs Hofstra-16/+4
2013-05-29Replaced calls to external fmin/fmax by a Rust implementation.Matthijs Hofstra-4/+31
2013-05-29Fix vec::mut_slicejune0cho-3/+3
2013-05-28auto merge of #6780 : june0cho/rust/issue5984, r=brsonbors-2/+9
Fix #5984. Also, I found a problem on type inference and left a comment.
2013-05-28auto merge of #6740 : Aatch/rust/atomic-types, r=brsonbors-68/+118
This is a follow up to #6732. Makes everything a little more sound. r? @brson
2013-05-28Silence various warnings throughout test modulesAlex Crichton-90/+90
2013-05-28auto merge of #6771 : thestinger/rust/highlight, r=luqmanabors-98/+140
This works with pandoc linked against highlighting-kate >= 0.5.3.8. It seems to just be a no-op with earlier versions, because I successfully ran this through `try`. This also fixes some consistency issues (like making `Example`/`Examples` always a header and always using three tildes).
2013-05-28core::vec is missing methods for mutable slicesJunyoung Cho-2/+9
2013-05-27auto merge of #6724 : thestinger/rust/swap_fast, r=thestingerbors-25/+116
Passing higher alignment values gives the optimization passes more freedom since it can copy in larger chunks. This change results in rustc outputting the same post-optimization IR as clang for swaps and most copies excluding the lack of information about padding. Code snippet: ```rust #[inline(never)] fn swap<T>(x: &mut T, y: &mut T) { util::swap(x, y); } ``` Original IR (for `int`): ```llvm define internal fastcc void @_ZN9swap_283417_a71830ca3ed2d65d3_00E(i64*, i64*) #1 { static_allocas: %2 = icmp eq i64* %0, %1 br i1 %2, label %_ZN4util9swap_283717_a71830ca3ed2d65d3_00E.exit, label %3 ; <label>:3 ; preds = %static_allocas %4 = load i64* %0, align 1 %5 = load i64* %1, align 1 store i64 %5, i64* %0, align 1 store i64 %4, i64* %1, align 1 br label %_ZN4util9swap_283717_a71830ca3ed2d65d3_00E.exit _ZN4util9swap_283717_a71830ca3ed2d65d3_00E.exit: ; preds = %3, %static_allocas ret void } ``` After #6710: ```llvm define internal fastcc void @_ZN9swap_283017_a71830ca3ed2d65d3_00E(i64* nocapture, i64* nocapture) #1 { static_allocas: %2 = load i64* %0, align 1 %3 = load i64* %1, align 1 store i64 %3, i64* %0, align 1 store i64 %2, i64* %1, align 1 ret void } ``` After this change: ```llvm define internal fastcc void @_ZN9swap_283017_a71830ca3ed2d65d3_00E(i64* nocapture, i64* nocapture) #1 { static_allocas: %2 = load i64* %0, align 8 %3 = load i64* %1, align 8 store i64 %3, i64* %0, align 8 store i64 %2, i64* %1, align 8 ret void } ``` Another example: ```rust #[inline(never)] fn set<T>(x: &mut T, y: T) { *x = y; } ``` Before, with `(int, int)` (align 1): ```llvm define internal fastcc void @_ZN8set_282517_8fa972e3f9e451983_00E({ i64, i64 }* nocapture, { i64, i64 }* nocapture) #1 { static_allocas: %2 = bitcast { i64, i64 }* %1 to i8* %3 = bitcast { i64, i64 }* %0 to i8* tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %3, i8* %2, i64 16, i32 1, i1 false) ret void } ``` After, with `(int, int)` (align 8): ```llvm define internal fastcc void @_ZN8set_282617_8fa972e3f9e451983_00E({ i64, i64 }* nocapture, { i64, i64 }* nocapture) #1 { static_allocas: %2 = bitcast { i64, i64 }* %1 to i8* %3 = bitcast { i64, i64 }* %0 to i8* tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %3, i8* %2, i64 16, i32 8, i1 false) ret void } ```
2013-05-27fix casts on 32-bitDaniel Micay-2/+2
2013-05-27auto merge of #6703 : sanxiyn/rust/allocation-lint, r=sanxiynbors-5/+5
Fix #6145. In particular, handle operator overloading.
2013-05-27syntax highlight code examples in docstringsDaniel Micay-98/+140
2013-05-28Remove unnecessary allocations flagged by lintSeo Sanghyeon-5/+5
2013-05-27Get rid of no-longer-needed #[doc(hidden)] attributes.Lindsey Kuper-11/+2
There were several old `#[doc(hidden)]` attributes in libstd and libextra, left over from when rustdoc didn't hide private definitions, tagged with `FIXME #3538`. Since #3538 is now closed, I removed the `#[doc(hidden)]` attributes as well as the FIXMEs, but I left `#[doc(hidden)]` in libstd/task/spawn.rs and libstd/task/rt.rs since those two are apparently `pub`, as well as in libextra/std.rc since std/extra is `pub`.
2013-05-27auto merge of #6763 : steveklabnik/rust/core_to_std, r=thestingerbors-20/+20
When I submitted #6748 yesterday, I used the old name. r? @thestinger
2013-05-27Fix docs to use std instead of core.Steve Klabnik-20/+20
When I submitted #6748 yesterday, I used the old name.
2013-05-27Rename unwrap_input/unwrap_output as suggested bygareth-11/+11
@brson. Also fix a few documentation bugs.
2013-05-27Make test_change_working_directory change the currentgareth-3/+5
directory to be the parent of the current-current directory, instead of changing to the tmp directory, which was causing issues with OS X and its /tmp => /private/tmp symlink.
2013-05-27Refactor core::run in order to address many of the issuesgareth-304/+607
mentioned in #2625. This change makes the module more oriented around Process values instead of having to deal with process ids directly. Apart from issues mentioned in #2625, other changes include: - Changing the naming to be more consistent - Process/process is now used instead of a mixture of Program/program and Process/process. - More docs/tests. Some io/scheduler related issues remain (mentioned in #2625).
2013-05-26auto merge of #6748 : steveklabnik/rust/bool_docs, r=thestingerbors-19/+194
There was some before, but now we have a big header, as well as lots of individual bits of documentation.
2013-05-26Add documentation for libstd/bool.rs.Steve Klabnik-19/+194
There was some before, but now we have a big header, as well as lots of individual bits of documentation.
2013-05-26inline bump_box_refcountDaniel Micay-0/+1
2013-05-26make transmute_copy use memcpy, and inline itDaniel Micay-0/+21
2013-05-26use uninit for cast::transmute_copyDaniel Micay-1/+1
2013-05-26add memset32/memset64Daniel Micay-0/+34
2013-05-26C++0x -> C++11Daniel Micay-1/+1
2013-05-26make the memcpy/memmove intrinsics higher-levelDaniel Micay-23/+58
This allows them to make use of the type's alignment, instead of being pessimistic and assuming it is only 1.
2013-05-25testsuite: Add a test for listing the root directory...Tim Chevalier-1/+15
...and don't treat Path("/") like Path("").
2013-05-25core: Fail with a better error message when list_dir gets an empty pathTim Chevalier-0/+11
(Yes, this did happen in real life...)
2013-05-26Add some documentationJames Miller-1/+25
2013-05-26Add AtomicOption typeJames Miller-33/+91
2013-05-26Make AtomicPtr use *mut, instead of ~James Miller-47/+15
2013-05-25auto merge of #6722 : alexcrichton/rust/issue-4219-no-merge-hack, r=brsonbors-1149/+941
Changes the int/uint modules to all use macros instead of using the `merge` attribute. It would be nice to have #4375 resolved as well for this, but that can probably come at a later date. Closes #4219.
2013-05-25Add basic atomic typesJames Miller-0/+344
2013-05-24Remove usage of the #[merge] hack with int modulesAlex Crichton-1149/+941
2013-05-24auto merge of #6712 : thestinger/rust/derive, r=catamorphismbors-24/+2