about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2013-10-23std::rand: full exponential & normal distributionsHuon Wilson-20/+116
Complete the implementation of Exp and Normal started by Exp1 and StandardNormal by creating types implementing Sample & IndependentSample with the appropriate parameters.
2013-10-23std::rand: Add RandSample for Sample-ing Rand types directly.Huon Wilson-0/+35
2013-10-23std::rand: add the Sample and IndependentSample traits.Huon Wilson-0/+18
These are a "parameterised" Rand.
2013-10-22Tidy up asm! usage in libstdAlex Crichton-11/+7
2013-10-23Making ai_next field publicreedlepee-1/+1
2013-10-23Removed the file src/libstd/unstable/extfmt.rreedlepee-703/+0
2013-10-23Removed the unnecesary commentsreedlepee-1/+0
2013-10-23Removed unnecessary comments and white spaces as suggestedreedlepee-49/+21
2013-10-23Removed Unnecessary comments and white spaces #4386reedlepee-422/+217
2013-10-23Making fields in std and extra : private #4386reedlepee-354/+1286
2013-10-23Don't Make str field privatereedlepee-0/+1
2013-10-22Minor grammatical fixes and removed section on 'rust' toolMichael Letterle-2/+2
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-321/+321
Who doesn't like a massive renaming?
2013-10-22auto merge of #10009 : LeoTestard/rust/asm-feature-gated, r=huonwbors-1/+1
Suite of #9991
2013-10-22Activate checking code for ASM feature gate. Fix testsLéo Testard-1/+1
2013-10-21auto merge of #9937 : brson/rust/log_str, r=alexcrichtonbors-18/+13
2013-10-21auto merge of #9936 : madjar/rust/master, r=alexcrichtonbors-6/+0
This should close #9468. I removed the test stating that nested comments should not be implemented. I had a little chicken-and-egg problem because a comment of the std contains "/*", and adding support for nested comment creates a backward incompatibility in that case, so I had to use a dirty hack to get stage1 and stage2 to compile. This part should be revert when this commit lands in a snapshot. This is my first non-typo contribution, so I'm open to any comment.
2013-10-21auto merge of #10000 : cmr/rust/snapshot, r=alexcrichtonbors-3/+0
2013-10-21Add support for nested commentsGeorges Dubus-6/+0
Fixes #9468.
2013-10-21std: Move sys::log_str to repr::repr_to_str. Further work on #2240.Brian Anderson-18/+13
2013-10-21Register snapshotsCorey Richardson-3/+0
2013-10-21fix the new floating point intrinsicsDaniel Micay-2/+2
2013-10-21auto merge of #9986 : thestinger/rust/float, r=cmrbors-0/+20
copysign, ring, nearbyint, round
2013-10-21expose new floating point intrinsicsDaniel Micay-0/+20
copysign, ring, nearbyint, round
2013-10-20Don't allocate a string when calling printlnAlex Crichton-1/+18
Instead use format_args! to pass around a struct to pass along into std::fmt
2013-10-20auto merge of #9812 : HNO3/rust/windows-utf8, r=alexcrichtonbors-5/+96
This fixes #9418 and #9618, and potential problems related to directory walking.
2013-10-20Fix unicode errors on Windows in path_is_dir, path_exists, getcwd and ↵LEE Wondong-5/+96
rust_localtime. This make these functions use wchar_t version of APIs, instead of char version.
2013-10-19auto merge of #9952 : huonw/rust/fmt-doc, r=alexcrichtonbors-14/+14
Cf. the concern raised in https://github.com/mozilla/rust/pull/9938#issuecomment-26648696.
2013-10-19auto merge of #9834 : alexcrichton/rust/morestack, r=brsonbors-67/+412
This commit re-introduces the functionality of __morestack in a way that it was not originally anticipated. Rust does not currently have segmented stacks, rather just large stack segments. We do not detect when these stack segments are overrun currently, but this commit leverages __morestack in order to check this. This commit purges a lot of the old __morestack and stack limit C++ functionality, migrating the necessary chunks to rust. The stack limit is now entirely maintained in rust, and the "main logic bits" of __morestack are now also implemented in rust as well. I put my best effort into validating that this currently builds and runs successfully on osx and linux 32/64 bit, but I was unable to get this working on windows. We never did have unwinding through __morestack frames, and although I tried poking at it for a bit, I was unable to understand why we don't get unwinding right now. A focus of this commit is to implement as much of the logic in rust as possible. This involved some liberal usage of `no_split_stack` in various locations, along with some use of the `asm!` macro (scary). I modified a bit of C++ to stop calling `record_sp_limit` because this is no longer defined in C++, rather in rust. Another consequence of this commit is that `thread_local_storage::{get, set}` must both be flagged with `#[rust_stack]`. I've briefly looked at the implementations on osx/linux/windows to ensure that they're pretty small stacks, and I'm pretty sure that they're definitely less than 20K stacks, so we probably don't have a lot to worry about. Other things worthy of note: * The default stack size is now 4MB instead of 2MB. This is so that when we request 2MB to call a C function you don't immediately overflow because you have consumed any stack at all. * `asm!` is actually pretty cool, maybe we could actually define context switching with it? * I wanted to add links to the internet about all this jazz of storing information in TLS, but I was only able to find a link for the windows implementation. Otherwise my suggestion is just "disassemble on that arch and see what happens" * I put my best effort forward on arm/mips to tweak __morestack correctly, we have no ability to test this so an extra set of eyes would be useful on these spots. * This is all really tricky stuff, so I tried to put as many comments as I thought were necessary, but if anything is still unclear (or I completely forgot to take something into account), I'm willing to write more!
2013-10-19Use __morestack to detect stack overflowAlex Crichton-67/+412
This commit resumes management of the stack boundaries and limits when switching between tasks. This additionally leverages the __morestack function to run code on "stack overflow". The current behavior is to abort the process, but this is probably not the best behavior in the long term (for deails, see the comment I wrote up in the stack exhaustion routine).
2013-10-19std::fmt: fix markdown peculiarity, unicodify some arrows, ` some trait names.Huon Wilson-14/+14
2013-10-19auto merge of #9932 : alexcrichton/rust/better-fmt-errors, r=cmrbors-24/+27
Instead of just saying "unterminated format string" and friends, instead print information about what was expected and what was found. Closes #9931
2013-10-18Try to improve format! error messagesAlex Crichton-24/+27
Instead of just saying "unterminated format string" and friends, instead print information about what was expected and what was found. Closes #9931
2013-10-18auto merge of #9938 : alexcrichton/rust/fmtdox, r=huonwbors-3/+48
Closes #9865 Closes #9808
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-18Document traits and Default about format! betterAlex Crichton-3/+48
Closes #9865 Closes #9808
2013-10-18auto merge of #9935 : reedlepee123/rust/my_new_branch, r=bstriebors-6/+6
2013-10-19Make fields in std::comm privatechitra-6/+6
2013-10-18Fix an off-by-one in managed::refcountAlex Crichton-1/+12
This fixes a bug I accidentally introduced in #9922
2013-10-18auto merge of #9926 : Kimundi/rust/future_result_bad_sig, r=huonwbors-64/+30
2013-10-18Made `std::task::TaskBuilder::future_result()` easier to useMarvin Löbel-64/+30
2013-10-18auto merge of #9924 : metajack/rust/fix-starts-with-ends-with, r=huonwbors-2/+6
d4a32386f3b6 broke these since slice_to() and slice_from() must get character boundaries, and arbitrary needle lengths don't necessarily map to character boundaries of the haystack. This also adds new tests that would have caught this bug.
2013-10-17Fix starts_with() and ends_with().Jack Moffitt-2/+6
d4a32386f3b6 broke these since slice_to() and slice_from() must get character boundaries, and arbitrary needle lengths don't necessarily map to character boundaries of the haystack. This also adds new tests that would have caught this bug.
2013-10-17Move sys::refcount to managed::refcountAlex Crichton-10/+7
More progress on #2240
2013-10-17std: Move size/align functions to std::mem. #2240Brian Anderson-202/+221
2013-10-17auto merge of #9908 : alexcrichton/rust/snapshots, r=thestingerbors-167/+0
2013-10-17Register new snapshotsAlex Crichton-167/+0
2013-10-17auto merge of #9907 : kballard/rust/vec_ends_with, r=alexcrichtonbors-21/+54
2013-10-17auto merge of #9900 : hatahet/rust/master, r=alexcrichtonbors-1/+1
Closes #9870