about summary refs log tree commit diff
path: root/src/libstd/unstable
AgeCommit message (Collapse)AuthorLines
2013-08-15Add ToCStr method .with_c_str()Kevin Ballard-3/+3
.with_c_str() is a replacement for the old .as_c_str(), to avoid unnecessary boilerplate. Replace all usages of .to_c_str().with_ref() with .with_c_str().
2013-08-13auto merge of #8446 : alexcrichton/rust/ifmt++, r=graydonbors-0/+1
This includes a number of improvements to `ifmt!` * Implements formatting arguments -- `{:0.5x}` works now * Formatting now works on all integer widths, not just `int` and `uint` * Added a large doc block to `std::fmt` which should help explain what `ifmt!` is all about * Added floating point formatters, although they have the same pitfalls from before (they're just proof-of-concept now) Closed a couple of issues along the way, yay! Once this gets into a snapshot, I'll start looking into removing all of `fmt`
2013-08-13auto merge of #8411 : bblum/rust/assorted-fixes, r=brsonbors-19/+21
Each commit is pretty much what it says on the tin. r anybody.
2013-08-12auto merge of #8487 : brson/rust/local-opts, r=brsonbors-7/+7
I did this once but acciddentally undid it in a later patch.
2013-08-12Implement formatting arguments for strings and integersAlex Crichton-0/+1
Closes #1651
2013-08-12std: Re-optimize tls access on local allocation pathBrian Anderson-7/+7
I did this once but acciddentally undid it in a later patch.
2013-08-12fix build with the new snapshot compilerDaniel Micay-29/+0
2013-08-12Don't use unkillable in UnsafeArc dtor when there's no unwrapper. Close #8382.Ben Blum-19/+21
2013-08-11auto merge of #8455 : nikomatsakis/rust/issue-5762-objects-dralston-d, r=graydonbors-1/+23
Fix #5762 and various other aspects of object invocation. r? @graydon
2013-08-11Update type visitor to use &Visitor and not @VisitorNiko Matsakis-0/+4
2013-08-11Add a field `borrow_offset` to the type descriptor indicatingNiko Matsakis-1/+19
what amount a T* pointer must be adjusted to reach the contents of the box. For `~T` types, this requires knowing the type `T`, which is not known in the case of objects.
2013-08-11auto merge of #8412 : thestinger/rust/vector-add, r=alexcrichtonbors-8/+1
2013-08-11fix unused importsDaniel Micay-2/+1
2013-08-11move `strdup_uniq` lang item to std::strDaniel Micay-6/+0
2013-08-11add intrinsics for checked overflow add/sub/mulDaniel Micay-0/+54
2013-08-10Mass rename of .consume{,_iter}() to .move_iter()Erick Tryzelaar-1/+1
cc #7887
2013-08-09auto merge of #8296 : erickt/rust/remove-str-trailing-nulls, r=ericktbors-9/+14
This PR fixes #7235 and #3371, which removes trailing nulls from `str` types. Instead, it replaces the creation of c strings with a new type, `std::c_str::CString`, which wraps a malloced byte array, and respects: * No interior nulls * Ends with a trailing null
2013-08-09Merge remote-tracking branch 'remotes/origin/master' into ↵Erick Tryzelaar-20/+23
remove-str-trailing-nulls
2013-08-09Remove the C++ runtime. SayonaraBrian Anderson-77/+23
2013-08-09std: Fix perf of local allocations in newschedBrian Anderson-20/+23
Mostly optimizing TLS accesses to bring local heap allocation performance closer to that of oldsched. It's not completely at parity but removing the branches involved in supporting oldsched and optimizing pthread_get/setspecific to instead use our dedicated TCB slot will probably make up for it.
2013-08-08Merge remote-tracking branch 'remotes/origin/master' into ↵Erick Tryzelaar-1/+1
remove-str-trailing-nulls
2013-08-07Turn on the new runtimeBrian Anderson-1/+1
2013-08-07Merge remote-tracking branch 'remotes/origin/master' into ↵Erick Tryzelaar-1/+10
remove-str-trailing-nulls
2013-08-06add an intrinsic for inbounds GEPDaniel Micay-1/+10
2013-08-04Merge remote-tracking branch 'remotes/origin/master' into str-remove-nullErick Tryzelaar-14/+9
2013-08-04Remove trailing null from stringsErick Tryzelaar-6/+8
2013-08-04std: replace str::as_c_str with std::c_strErick Tryzelaar-3/+6
2013-08-03auto merge of #8264 : thestinger/rust/snapshot, r=Aatchbors-14/+9
2013-08-03remove obsolete `foreach` keywordDaniel Micay-8/+8
this has been replaced by `for`
2013-08-03register snapshotsDaniel Micay-6/+1
2013-08-03auto merge of #8219 : sstewartgallus/rust/fix_dynamic_lib, r=graydonbors-36/+70
A test case was also created for this situation to prevent the problem occuring again. A similar problem was also fixed for the symbol method. There was some minor code cleanup. I am unsatisfied with using /dev/null as an invalid dynamic library. It is not cross platform.
2013-08-02librustc: Disallow "unsafe" for external functionsPatrick Walton-12/+7
2013-08-02auto merge of #8195 : bblum/rust/task-cleanup, r=brsonbors-6/+4
In the first commit it is obvious why some of the barriers can be changed to ```Relaxed```, but it is not as obvious for the once I changed in ```kill.rs```. The rationale for those is documented as part of the documenting commit. Also the last commit is a temporary hack to prevent kill signals from being received in taskgroup cleanup code, which could be fixed in a more principled way once the old runtime is gone.
2013-08-02auto merge of #8175 : brson/rust/nodbg, r=graydonbors-2/+0
This stuff is ancient, unused, and tied to oldsched
2013-08-01Fix calling destructor on uninitialized dynamic library crash.Steven Stewart-Gallus-36/+70
A test case was also created for this situation to prevent the problem occuring again. A similar problem was also fixed for the symbol method. There was some minor code cleanup.
2013-08-02replace `range` with an external iteratorDaniel Micay-3/+3
2013-08-01A major refactoring that changes the way the runtime uses TLS. In thetoddaaro-3/+0
old design the TLS held the scheduler struct, and the scheduler struct held the active task. This posed all sorts of weird problems due to how we wanted to use the contents of TLS. The cleaner approach is to leave the active task in TLS and have the task hold the scheduler. To make this work out the scheduler has to run inside a regular task, and then once that is the case the context switching code is massively simplified, as instead of three possible paths there is only one. The logical flow is also easier to follow, as the scheduler struct acts somewhat like a "token" indicating what is active. These changes also necessitated changing a large number of runtime tests, and rewriting most of the runtime testing helpers. Polish level is "low", as I will very soon start on more scheduler changes that will require wiping the polish off. That being said there should be sufficient comments around anything complex to make this entirely respectable as a standalone commit.
2013-08-01Relax some atomic barriers. Loosen up all that tension. There, doesn't that ↵Ben Blum-6/+4
feel good?
2013-08-01std: Change `Times` trait to use `do` instead of `for`blake2-ppc-2/+2
Change the former repetition:: for 5.times { } to:: do 5.times { } .times() cannot be broken with `break` or `return` anymore; for those cases, use a numerical range loop instead.
2013-08-01auto merge of #8158 : bblum/rust/task-cleanup, r=brsonbors-8/+56
r? @brson
2013-08-01migrate many `for` loops to `foreach`Daniel Micay-7/+6
2013-07-31extra: Remove dbg module and rt support codeBrian Anderson-2/+0
This stuff is ancient, unused, and tied to oldsched
2013-07-31auto merge of #8151 : sanxiyn/rust/atomicrmw, r=cmrbors-82/+0
#8039 broke ARM build, and nothing uses these yet.
2013-07-31Move atomically to unstable::sync, and document what it actually does. Close ↵Ben Blum-8/+56
#7872.
2013-07-31Revert atomicrmw {max, min, umax, umin}Seo Sanghyeon-82/+0
2013-07-31auto merge of #8139 : brson/rust/rm-old-task-apis, r=pcwaltonbors-18/+7
This removes a bunch of options from the task builder interface that are irrelevant to the new scheduler and were generally unused anyway. It also bumps the stack size of new scheduler tasks so that there's enough room to run rustc and changes the interface to `Thread` to not implicitly join threads on destruction, but instead require an explicit, and mandatory, call to `join`.
2013-07-30auto merge of #8008 : bblum/rust/select, r=brsonbors-128/+181
Main logic in ```Implement select() for new runtime pipes.```. The guts of the ```PortOne::try_recv()``` implementation are now split up across several functions, ```optimistic_check```, ```block_on```, and ```recv_ready```. There is one weird FIXME I left open here, in the "implement select" commit -- an assertion I couldn't get to work in the receive path, on an invariant that for some reason doesn't hold with ```SharedPort```. Still investigating this.
2013-07-30std::rt: Change Thread interface to require an explicit joinBrian Anderson-18/+7
Makes it more obvious what's going on
2013-07-30UnsafeArc methods return unsafe pointers, so are not themselves unsafe.Ben Blum-115/+114
2013-07-30Add test cases for selectBen Blum-0/+26