about summary refs log tree commit diff
path: root/src/libstd/unstable
AgeCommit message (Collapse)AuthorLines
2013-11-10Register new snapshotsAlex Crichton-13/+1
2013-11-10temporarily disable tests on android and tagging issue number #10379Young-il Choi-0/+1
2013-11-07std: Make atomic types non-copyable. Closes #8380Brian Anderson-14/+20
2013-11-06Register new snapshotsAlex Crichton-39/+9
2013-11-05Rename misleading contains_managed to owns_managedNiko Matsakis-0/+5
2013-11-04auto merge of #10064 : luqmana/rust/vvv, r=nikomatsakisbors-0/+3
Fixes #2057. Example: ```Rust #[no_std]; type c_char = u8; type c_int = i32; type size_t = uint; extern { fn printf(format: *c_char, ...) -> c_int; } #[lang="fail_bounds_check"] fn fail_bounds_check(_: *c_char, _: size_t, _: size_t, _: size_t) {} #[start] #[fixed_stack_segment] fn main(_: int, _: **u8) -> int { unsafe { let msg = bytes!("Hello World!
2013-11-04libsyntax/librustc: Allow calling variadic foreign functions.Luqman Aden-0/+3
2013-11-04auto merge of #10182 : alexcrichton/rust/typeid-intrinsic, r=nikomatsakisbors-4/+10
This isn't quite as fancy as the struct in #9913, but I'm not sure we should be exposing crate names/hashes of the types. That being said, it'd be pretty easy to extend this (the deterministic hashing regardless of what crate you're in was the hard part).
2013-11-03simplify memcpy/memmove/memset intrinsicsDaniel Micay-0/+15
This moves the per-architecture difference into the compiler.
2013-11-01Register new snapshotsAlex Crichton-3/+0
Closes #2240
2013-11-01Add a type_id intrinsicAlex Crichton-4/+10
Closes #9913
2013-10-30auto merge of #10120 : Kimundi/rust/remove_sys, r=alexcrichtonbors-1/+31
- `begin_unwind` and `fail!` is now generic over any `T: Any + Send`. - Every value you fail with gets boxed as an `~Any`. - Because of implementation issues, `&'static str` and `~str` are still handled specially behind the scenes. - Changed the big macro source string in libsyntax to a raw string literal, and enabled doc comments there.
2013-10-30Prepared `std::sys` for removal, and made `begin_unwind` simplerMarvin Löbel-1/+31
- `begin_unwind` is now generic over any `T: Any + Send`. - Every value you fail with gets boxed as an `~Any`. - Because of implementation details, `&'static str` and `~str` are still handled specially behind the scenes. - Changed the big macro source string in libsyntax to a raw string literal, and enabled doc comments there.
2013-10-30auto merge of #9613 : jld/rust/enum-discrim-size.r0, r=alexcrichtonbors-4/+9
Allows an enum with a discriminant to use any of the primitive integer types to store it. By default the smallest usable type is chosen, but this can be overridden with an attribute: `#[repr(int)]` etc., or `#[repr(C)]` to match the target's C ABI for the equivalent C enum. Also adds a lint pass for using non-FFI safe enums in extern declarations, checks that specified discriminants can be stored in the specified type if any, and fixes assorted code that was assuming int.
2013-10-29auto merge of #10058 : alexcrichton/rust/uv-crate, r=brsonbors-1/+1
This is one of the final steps needed to complete #9128. It still needs a little bit of polish before closing that issue, but it's in a pretty much "done" state now. The idea here is that the entire event loop implementation using libuv is now housed in `librustuv` as a completely separate library. This library is then injected (via `extern mod rustv`) into executable builds (similarly to how libstd is injected, tunable via `#[no_uv]`) to bring in the "rust blessed event loop implementation." Codegen-wise, there is a new `event_loop_factory` language item which is tagged on a function with 0 arguments returning `~EventLoop`. This function's symbol is then inserted into the crate map for an executable crate, and if there is no definition of the `event_loop_factory` language item then the value is null. What this means is that embedding rust as a library in another language just got a little harder. Libraries don't have crate maps, which means that there's no way to find the event loop implementation to spin up the runtime. That being said, it's always possible to build the runtime manually. This request also makes more runtime components public which should probably be public anyway. This new public-ness should allow custom scheduler setups everywhere regardless of whether you follow the `rt::start `path.
2013-10-29Adjust reflection for the possibility of discriminants larger than int.Jed Davis-4/+9
Not only can discriminants be smaller than int now, but they can be larger than int on 32-bit targets. This has obvious implications for the reflection interface. Without this change, things fail with LLVM assertions when we try to "extend" i64 to i32.
2013-10-29auto merge of #10135 : alexcrichton/rust/snapshots, r=thestingerbors-5/+4
Plus some migration from `let mut this = self` to `mut self` (yay!)
2013-10-28auto merge of #10127 : thestinger/rust/cold, r=pcwaltonbors-0/+2
This allows a function to marked as infrequently called, resulting in any branch calling it to be considered colder.
2013-10-28Register new snapshotsAlex Crichton-5/+4
2013-10-28Make some more rt components publicAlex Crichton-1/+1
Primarily this makes the Scheduler and all of its related interfaces public. The reason for doing this is that currently any extern event loops had no access to the scheduler at all. This allows third-party event loops to manipulate the scheduler, along with allowing the uv event loop to live inside of its own crate.
2013-10-28add support for the `cold` function attributeDaniel Micay-0/+2
This allows a function to marked as infrequently called, resulting in any branch calling it to be considered colder.
2013-10-28auto merge of #10094 : alexcrichton/rust/issue-8704, r=pcwaltonbors-2/+2
This drops more of the old C++ runtime to rather be written in rust. A few features were lost along the way, but hopefully not too many. The main loss is that there are no longer backtraces associated with allocations (rust doesn't have a way of acquiring those just yet). Other than that though, I believe that the rest of the debugging utilities made their way over into rust. Closes #8704
2013-10-28Allow fail messages to be caught, and introduce the Any traitMarvin Löbel-11/+31
Some code cleanup, sorting of import blocks Removed std::unstable::UnsafeArc's use of Either Added run-fail tests for the new FailWithCause impls Changed future_result and try to return Result<(), ~Any>. - Internally, there is an enum of possible fail messages passend around. - In case of linked failure or a string message, the ~Any gets lazyly allocated in future_results recv method. - For that, future result now returns a wrapper around a Port. - Moved and renamed task::TaskResult into rt::task::UnwindResult and made it an internal enum. - Introduced a replacement typedef `type TaskResult = Result<(), ~Any>`.
2013-10-26Rewrite boxed_region/memory_region in RustAlex Crichton-2/+2
This drops more of the old C++ runtime to rather be written in rust. A few features were lost along the way, but hopefully not too many. The main loss is that there are no longer backtraces associated with allocations (rust doesn't have a way of acquiring those just yet). Other than that though, I believe that the rest of the debugging utilities made their way over into rust. Closes #8704
2013-10-24Implement a basic event loop built on LittleLockAlex Crichton-0/+47
It's not guaranteed that there will always be an event loop to run, and this implementation will serve as an incredibly basic one which does not provide any I/O, but allows the scheduler to still run. cc #9128
2013-10-23mark some functions as returning !Daniel Micay-2/+1
Closes #10023
2013-10-23register snapshotsDaniel Micay-8/+0
2013-10-23Removed the file src/libstd/unstable/extfmt.rreedlepee-703/+0
2013-10-23Removed Unnecessary comments and white spaces #4386reedlepee-18/+1
2013-10-23Making fields in std and extra : private #4386reedlepee-8/+728
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-9/+9
Who doesn't like a massive renaming?
2013-10-21auto merge of #10000 : cmr/rust/snapshot, r=alexcrichtonbors-3/+0
2013-10-21Register snapshotsCorey Richardson-3/+0
2013-10-21fix the new floating point intrinsicsDaniel Micay-2/+2
2013-10-21expose new floating point intrinsicsDaniel Micay-0/+20
copysign, ring, nearbyint, round
2013-10-18auto merge of #9919 : alexcrichton/rust/fmt-begone, r=huonwbors-704/+0
It lived a good life, but its time has come. The groundwork is set for the official transition after the next snapshot (removal of XXX2 macros)
2013-10-18Remove the fmt! syntax extensionAlex Crichton-704/+0
It lived a good life, but its time has come. The groundwork is set for the official transition after the next snapshot (removal of XXX2 macros)
2013-10-18auto merge of #9926 : Kimundi/rust/future_result_bad_sig, r=huonwbors-7/+4
2013-10-18Made `std::task::TaskBuilder::future_result()` easier to useMarvin Löbel-7/+4
2013-10-17std: Move size/align functions to std::mem. #2240Brian Anderson-1/+1
2013-10-17Register new snapshotsAlex Crichton-1/+0
2013-10-17Removed the -Z once_fns compiler flag and added the new feature directive of ↵Chris Sainty-1/+2
the same name to replace it. Changed the frame_address intrinsic to no longer be a once fn. This removes the dependency on once_fns from std.
2013-10-16auto merge of #9885 : thestinger/rust/vector, r=brsonbors-1/+1
The goal here is to avoid requiring a division or multiplication to compare against the length. The bounds check previously used an incorrect micro-optimization to replace the division by a multiplication, but now neither is necessary *for slices*. Unique/managed vectors will have to do a division to get the length until they are reworked/replaced.
2013-10-15path2: Adjust the API to remove all the _str mutation methodsKevin Ballard-1/+1
Add a new trait BytesContainer that is implemented for both byte vectors and strings. Convert Path::from_vec and ::from_str to one function, Path::new(). Remove all the _str-suffixed mutation methods (push, join, with_*, set_*) and modify the non-suffixed versions to use BytesContainer.
2013-10-15path2: Replace the path module outrightKevin Ballard-1/+1
Remove the old path. Rename path2 to path. Update all clients for the new path. Also make some miscellaneous changes to the Path APIs to help the adoption process.
2013-10-15fix bounds checking failure messageDaniel Micay-1/+1
casting the `uint` to an `int` can result in printing high values as negative intege
2013-10-14add an `abort` intrinsicDaniel Micay-0/+3
This should be preferred to the libc `abort` function.
2013-10-14Remove unused abi attributes.Steve Klabnik-1/+0
They've been replaced by putting the name on the extern block. #[abi = "foo"] goes to extern "foo" { } Closes #9483.
2013-10-11De-pub some private runtime componentsAlex Crichton-14/+4
This change was waiting for privacy to get sorted out, which should be true now that #8215 has landed. Closes #4427
2013-10-08auto merge of #9759 : thestinger/rust/immediate, r=alexcrichtonbors-1/+3
Closes #9651