summary refs log tree commit diff
path: root/src/libstd/unstable
AgeCommit message (Collapse)AuthorLines
2013-06-30add a contains_managed intrinsicDaniel Micay-0/+4
2013-06-30simplify the exchange allocatorDaniel Micay-100/+0
* 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-28Rewrite each_path to allow performance improvements in the future.Patrick Walton-0/+1
Instead of determining paths from the path tag, we iterate through modules' children recursively in the metadata. This will allow for lazy external module resolution.
2013-06-28librustc: Change "Owned" to "Send" everywherePatrick Walton-13/+13
2013-06-27Rename #[no_drop_flag] to #[unsafe_no_drop_flag]Birunthan Mohanathas-1/+1
2013-06-26auto merge of #7113 : alexcrichton/rust/banned-warnings, r=cmrbors-2/+1
Reopening of #7031, Closes #6963 I imagine though that this will bounce in bors once or twice... Because attributes can't be cfg(stage0)'d off, there's temporarily a lot of new stage0/stage1+ code.
2013-06-25Change finalize -> drop.Luqman Aden-6/+6
2013-06-25Deny common lints by default for lib{std,extra}Alex Crichton-2/+1
2013-06-25auto merge of #7317 : Aatch/rust/no-drop-flag, r=thestingerbors-0/+1
This adds a `#[no_drop_flag]` attribute. This attribute tells the compiler to omit the drop flag from the struct, if it has a destructor. When the destructor is run, instead of setting the drop flag, it instead zeroes-out the struct. This means the destructor can run multiple times and therefore it is up to the developer to use it safely. The primary usage case for this is smart-pointer types like `Rc<T>` as the extra flag caused the struct to be 1 word larger because of alignment. This closes #7271 and #7138
2013-06-25auto merge of #7254 : Blei/rust/intrinsic-overhaul, r=cmrbors-8/+134
This sets the `get_tydesc()` return type correctly and removes the intrinsic module. See #3730, #3475. Update: this now also removes the unused shape fields in tydescs.
2013-06-25Remove stage0 cfgsJames Miller-50/+0
2013-06-25Set #[no_drop_flag] on Rc<T> and AtomicOption. Add TestJames Miller-0/+1
2013-06-23Remove unused TyDesc parameter from the glue functionsPhilipp Brüschweiler-0/+4
To remove the environment pointer, support for function pointers without an environment argument is needed (i.e. a fixed version of #6661).
2013-06-23Remove unused shape fields from typedescsPhilipp Brüschweiler-2/+0
2013-06-23Remove intrinsic modulePhilipp Brüschweiler-9/+130
To achieve this, the following changes were made: * Move TyDesc, TyVisitor and Opaque to std::unstable::intrinsics * Convert TyDesc, TyVisitor and Opaque to lang items instead of specially handling the intrinsics module * Removed TypeDesc, FreeGlue and get_type_desc() from sys Fixes #3475.
2013-06-23Fix get_tydesc() return typePhilipp Brüschweiler-0/+3
This fixes part of #3730, but not all. Also changes the TyDesc struct to be equivalent with the generated code, with the hope that the above issue may one day be closed for good, i.e. that the TyDesc type can completely be specified in the Rust sources and not be generated.
2013-06-23vec: remove BaseIter implementationDaniel Micay-1/+1
I removed the `static-method-test.rs` test because it was heavily based on `BaseIter` and there are plenty of other more complex uses of static methods anyway.
2013-06-22Finish up Type refactoringJames Miller-5/+5
2013-06-22Add the rest of the atomic operations.James Miller-0/+112
This makes the handling of atomic operations more generic, which does impose a specific naming convention for the intrinsics, but that seems ok with me, rather than having an individual case for each name. It also adds the intrinsics to the the intrinsics file.
2013-06-21vec: rm old_iter implementations, except BaseIterDaniel Micay-1/+1
The removed test for issue #2611 is well covered by the `std::iterator` module itself. This adds the `count` method to `IteratorUtil` to replace `EqIter`.
2013-06-21libstd: cleanup warningsJames Miller-16/+3
2013-06-21Remove all #[cfg(stage0)]-protected codeJames Miller-13/+0
New snapshot means this can all go. Also removes places that have comments that say they are workarounds for stage0 errors.
2013-06-18replace #[inline(always)] with #[inline]. r=burningtree.Graydon Hoare-43/+43
2013-06-17auto merge of #7131 : Blei/rust/windows-dynamic-lib, r=graydonbors-21/+33
The code compiles and runs under windows now, but I couldn't look up any symbol from the current executable (dlopen(NULL)), and calling looked up external function handles doesn't seem to work correctly under windows. This the beginning of a fix for #7095.
2013-06-15auto merge of #7109 : bblum/rust/rwlocks, r=brsonbors-0/+6
r? @brson links to issues: #7065 the race that's fixed; #7066 the perf improvement I added. There are also some minor cleanup commits here. To measure the performance improvement from replacing the exclusive with an atomic uint, I edited the ```msgsend-ring-rw-arcs``` bench test to do a ```write_downgrade``` instead of just a ```write```, so that it stressed the code paths that accessed ```read_count```. (At first I was still using ```write``` and saw no performance difference whatsoever, whoooops.) The bench test measures how long it takes to send 1,000,000 messages by using rwarcs to emulate pipes. I also measured the performance difference imposed by the fix to the ```access_lock``` race (which involves taking an extra semaphore in the ```cond.wait()``` path). The net result is that fixing the race imposes a 4% to 5% slowdown, but doing the atomic uint optimization gives a 6% to 8% speedup. Note that this speedup will be most visible in read- or downgrade-heavy workloads. If an RWARC's only users are writers, the optimization doesn't matter. All the same, I think this more than justifies the extra complexity I mentioned in #7066. The raw numbers are: ``` with xadd read count before write_cond fix 4.18 to 4.26 us/message with write_cond fix 4.35 to 4.39 us/message with exclusive read count before write_cond fix 4.41 to 4.47 us/message with write_cond fix 4.65 to 4.76 us/message ```
2013-06-15std::dynamic_lib: start fixing windows implementationPhilipp Brueschweiler-21/+33
The code compiles and runs under windows now, but I couldn't look up any symbol from the current executable (dlopen(NULL)), and calling looked up external function handles doesn't seem to work correctly under windows.
2013-06-12Document unstable::atomics fetch_* return valuesBen Blum-0/+6
2013-06-12Prototyped a dynamic library facility interfaceSteven Stewart-Gallus-0/+207
2013-06-12std: remove substr & str::count_*, methodise char_len, implement slice_chars.Huon Wilson-4/+4
The confusing mixture of byte index and character count meant that every use of .substr was incorrect; replaced by slice_chars which only uses character indices. The old behaviour of `.substr(start, n)` can be emulated via `.slice_from(start).slice_chars(0, n)`.
2013-06-11auto merge of #7056 : alexcrichton/rust/issue-4727, r=catamorphismbors-22/+16
Closes #4727
2013-06-11Add a finally impl for `extern "Rust" fn()`Alex Crichton-22/+16
2013-06-11option: remove redundant old_iter implsDaniel Micay-6/+6
2013-06-10Tag a bunch of destructors that need mutable self with FIXME for #4330. ↵Ben Blum-0/+1
Close #4943.
2013-06-10std: convert str::reserve* to methods, and methodise str::push_*.Huon Wilson-3/+3
2013-06-10std: remove str::{len, slice, is_empty} in favour of methods.Huon Wilson-1/+1
2013-06-09std: add reverse vec iterators, replace vec::each*_reverse.Huon Wilson-1/+2
2013-06-05Made fns in the impls for the Atomic structs pubMatthijs Hofstra-31/+31
2013-06-04std::cell: Modernize constructorsPhilipp Brüschweiler-4/+4
Part of #3853
2013-06-01Remove all uses of `pub impl`. rs=stylePatrick Walton-7/+7
2013-05-30Remove unnecessary 'use' formsDaniel Farina-2/+1
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-29librustc: Stop reexporting the standard modules from prelude.Patrick Walton-30/+36
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-26add memset32/memset64Daniel Micay-0/+10
2013-05-26C++0x -> C++11Daniel Micay-1/+1
2013-05-26make the memcpy/memmove intrinsics higher-levelDaniel Micay-4/+17
This allows them to make use of the type's alignment, instead of being pessimistic and assuming it is only 1.
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-25Add basic atomic typesJames Miller-0/+344
2013-05-23optimize util::swap, &mut pointers never aliasDaniel Micay-1/+0