about summary refs log tree commit diff
path: root/src/libstd/unstable
AgeCommit message (Collapse)AuthorLines
2013-10-08make small ty_struct immediateDaniel Micay-1/+3
Closes #9651
2013-10-07Fix existing privacy/visibility violationsAlex Crichton-1/+1
This commit fixes all of the fallout of the previous commit which is an attempt to refine privacy. There were a few unfortunate leaks which now must be plugged, and the most horrible one is the current `shouldnt_be_public` module now inside `std::rt`. I think that this either needs a slight reorganization of the runtime, or otherwise it needs to just wait for the external users of these modules to get replaced with their `rt` implementations. Other fixes involve making things pub which should be pub, and otherwise updating error messages that now reference privacy instead of referencing an "unresolved name" (yay!).
2013-10-05auto merge of #9713 : sfackler/rust/dynamic_lib, r=alexcrichtonbors-10/+19
The root issue is that dlerror isn't reentrant or even thread safe. The solution implemented here is to make a yielding spin lock over an AtomicFlag. This is pretty hacky, but the best we can do at this point. As far as I can tell, it isn't possible to create a global mutex without having to initialize it in a single threaded context. The Windows code isn't affected since errno is thread-local on Windows and it's running in an atomically block to ensure there isn't a green thread context switch. Closes #8156
2013-10-05Fix thread safety issues in dynamic_libSteven Fackler-10/+19
The root issue is that dlerror isn't reentrant or even thread safe. The Windows code isn't affected since errno is thread-local on Windows and it's running in an atomically block to ensure there isn't a green thread context switch. Closes #8156
2013-10-04Register new snapshotsAlex Crichton-2/+0
Now that #9662 is merged, we should be much more easily bootstrappable on windows now.
2013-10-01remove the `float` typeDaniel Micay-4/+5
It is simply defined as `f64` across every platform right now. A use case hasn't been presented for a `float` type defined as the highest precision floating point type implemented in hardware on the platform. Performance-wise, using the smallest precision correct for the use case greatly saves on cache space and allows for fitting more numbers into SSE/AVX registers. If there was a use case, this could be implemented as simply a type alias or a struct thanks to `#[cfg(...)]`. Closes #6592 The mailing list thread, for reference: https://mail.mozilla.org/pipermail/rust-dev/2013-July/004632.html
2013-09-30std: Remove usage of fmt!Alex Crichton-15/+15
2013-09-25rustdoc: Change all code-blocks with a scriptAlex Crichton-2/+2
find src -name '*.rs' | xargs sed -i '' 's/~~~.*{\.rust}/```rust/g' find src -name '*.rs' | xargs sed -i '' 's/ ~~~$/ ```/g' find src -name '*.rs' | xargs sed -i '' 's/^~~~$/ ```/g'
2013-09-23auto merge of #9454 : alexcrichton/rust/snapshot, r=thestingerbors-15/+0
2013-09-23Register new snapshotsAlex Crichton-15/+0
2013-09-23test: Fix rustdoc and tests.Patrick Walton-11/+0
2013-09-23librustc: Remove `@fn` managed closures from the language.Patrick Walton-1/+0
2013-09-23libsyntax: Introduce routines and remove all `@fn`s from libsyntax save the ↵Patrick Walton-8/+14
old visitor
2013-09-23Find the cratemap at runtime on windows.Luqman Aden-2/+2
2013-09-18librustc/libstd: No longer pass crate_map to start.Luqman Aden-0/+14
2013-09-18Register new snapshotsAlex Crichton-117/+1
2013-09-17remove unnecessary transmutesDaniel Micay-7/+1
2013-09-16switch Drop to `&mut self`Daniel Micay-5/+5
2013-09-13Remove all usage of change_dir_lockedAlex Crichton-53/+0
While usage of change_dir_locked is synchronized against itself, it's not synchronized against other relative path usage, so I'm of the opinion that it just really doesn't help in running tests. In order to prevent the problems that have been cropping up, this completely removes the function. All existing tests (except one) using it have been moved to run-pass tests where they get their own process and don't need to be synchronized with anyone else. There is one now-ignored rustpkg test because when I moved it to a run-pass test apparently run-pass isn't set up to have 'extern mod rustc' (it ends up having linkage failures).
2013-09-11Flag the dynamic_lib tests as ignoredAlex Crichton-1/+3
The library isn't thread-safe, cc #9137
2013-09-06Flag the Repr::repr function with #[inline]Alex Crichton-0/+1
This allows cross-crate inlining which is *very* good because this is called a lot throughout libstd (even when libstd is inlined across crates).
2013-09-03add type name to the tydescDaniel Micay-0/+3
Closes #8926
2013-09-02repr: handle tuple structs sanelyDaniel Micay-3/+3
Closes #8919
2013-09-02repr: add support for trait objectsDaniel Micay-1/+1
Closes #8916
2013-08-31repr: print the name of structsDaniel Micay-2/+2
2013-08-30auto merge of #8867 : thestinger/rust/smaller-arc, r=alexcrichtonbors-1/+9
2013-08-30auto merge of #8820 : alexcrichton/rust/no-io-writer, r=brsonbors-1/+100
At the same time, this updates the TyVisitor to use a mutable self because it's probably going to be mutating state as it goes along anyway.
2013-08-29auto merge of #8819 : vadimcn/rust/unit-tests, r=brsonbors-0/+1
Some of the tests are failing. I've only managed to fix 'memory_map_file', the rest are up for grabs... Fixes #5261.
2013-08-29reduce the size of UnsafeArc from 2 words to 1Daniel Micay-1/+9
2013-08-28Remove @io::Writer from sys/repr/reflectAlex Crichton-1/+100
At the same time, this updates the TyVisitor to use a mutable self because it's probably going to be mutating state as it goes along anyway.
2013-08-28Turned off libstd unit tests that currently fail on Windows.Vadim Chugunov-0/+1
2013-08-27Remove offset_inbounds for an unsafe offset functionAlex Crichton-9/+3
2013-08-27librustc: Ensure that type parameters are in the right positions in paths.Patrick Walton-4/+7
This removes the stacking of type parameters that occurs when invoking trait methods, and fixes all places in the standard library that were relying on it. It is somewhat awkward in places; I think we'll probably want something like the `Foo::<for T>::new()` syntax.
2013-08-27auto merge of #8771 : thestinger/rust/repr, r=catamorphismbors-3/+0
2013-08-27reflect: rm unused visit_{var,var_integral,constr}Daniel Micay-3/+0
2013-08-27std: use ArcData rather than c_void in UnsafeArc.Huon Wilson-17/+12
This means that fewer `transmute`s are required, so there is less chance of a `transmute` not having the corresponding `forget` (possibly leading to use-after-free, etc).
2013-08-27Rename UnsafeAtomicRcBox to UnsafeArc. Fixes #7674.Huon Wilson-42/+42
2013-08-26auto merge of #8700 : alexcrichton/rust/better-llvm, r=thestingerbors-0/+1
Beforehand, it was unclear whether rust was performing the "recommended set" of optimizations provided by LLVM for code. This commit changes the way we run passes to closely mirror that of clang, which in theory does it correctly. The notable changes include: * Passes are no longer explicitly added one by one. This would be difficult to keep up with as LLVM changes and we don't guaranteed always know the best order in which to run passes * Passes are now managed by LLVM's PassManagerBuilder object. This is then used to populate the various pass managers run. * We now run both a FunctionPassManager and a module-wide PassManager. This is what clang does, and I presume that we *may* see a speed boost from the module-wide passes just having to do less work. I have no measured this. * The codegen pass manager has been extracted to its own separate pass manager to not get mixed up with the other passes * All pass managers now include passes for target-specific data layout and analysis passes Some new features include: * You can now print all passes being run with `-Z print-llvm-passes` * When specifying passes via `--passes`, the passes are now appended to the default list of passes instead of overwriting them. * The output of `--passes list` is now generated by LLVM instead of maintaining a list of passes ourselves * Loop vectorization is turned on by default as an optimization pass and can be disabled with `-Z no-vectorize-loops` All of these "copies" of clang are based off their [source code](http://clang.llvm.org/doxygen/BackendUtil_8cpp_source.html) in case anyone is curious what my source is. I was hoping that this would fix #8665, but this does not help the performance issues found there. Hopefully i'll allow us to tweak passes or see what's going on to try to debug that problem.
2013-08-26Rewrite pass management with LLVMAlex Crichton-0/+1
Beforehand, it was unclear whether rust was performing the "recommended set" of optimizations provided by LLVM for code. This commit changes the way we run passes to closely mirror that of clang, which in theory does it correctly. The notable changes include: * Passes are no longer explicitly added one by one. This would be difficult to keep up with as LLVM changes and we don't guaranteed always know the best order in which to run passes * Passes are now managed by LLVM's PassManagerBuilder object. This is then used to populate the various pass managers run. * We now run both a FunctionPassManager and a module-wide PassManager. This is what clang does, and I presume that we *may* see a speed boost from the module-wide passes just having to do less work. I have no measured this. * The codegen pass manager has been extracted to its own separate pass manager to not get mixed up with the other passes * All pass managers now include passes for target-specific data layout and analysis passes Some new features include: * You can now print all passes being run with `-Z print-llvm-passes` * When specifying passes via `--passes`, the passes are now appended to the default list of passes instead of overwriting them. * The output of `--passes list` is now generated by LLVM instead of maintaining a list of passes ourselves * Loop vectorization is turned on by default as an optimization pass and can be disabled with `-Z no-vectorize-loops`
2013-08-26std: Add Win64 supportklutzy-0/+12
Some extern blobs are duplicated without "stdcall" abi, since Win64 does not use any calling convention. (Giving any abi to them causes llvm producing wrong bytecode.)
2013-08-23std: Reduce TLS accessBrian Anderson-12/+16
2013-08-22Enabled unit tests in std and extra.Vadim Chugunov-6/+3
2013-08-20rm obsolete integer to_str{,_radix} free functionsDaniel Micay-2/+1
2013-08-19Try to fix mac valgrind bot by disabling thread-heavy activities.Graydon Hoare-0/+15
2013-08-19Add externfn macro and correctly label fixed_stack_segmentsNiko Matsakis-6/+36
2013-08-18auto merge of #8560 : kballard/rust/reserve-yield, r=pcwaltonbors-10/+10
Rename task::yield() to task::deschedule(). Fixes #8494.
2013-08-18auto merge of #8551 : huonw/rust/speling, r=alexcrichtonbors-5/+5
(This doesn't add/remove `u`s or change `ize` to `ise`, or anything like that.)
2013-08-16Reserve 'yield' keywordKevin Ballard-10/+10
Rename task::yield() to task::deschedule(). Fixes #8494.
2013-08-16Remove the annihilate lang itemBrian Anderson-5/+0
2013-08-16doc: correct spelling in documentation.Huon Wilson-5/+5