summary refs log tree commit diff
path: root/src/libstd/sys.rs
AgeCommit message (Collapse)AuthorLines
2013-09-18Register new snapshotsAlex Crichton-9/+0
2013-09-16Add an SendStr typeMarvin Löbel-2/+3
A SendStr is a string that can hold either a ~str or a &'static str. This can be useful as an optimization when an allocation is sometimes needed but the common case is statically known. Possible use cases include Maps with both static and owned keys, or propagating error messages across task boundaries. SendStr implements most basic traits in a way that hides the fact that it is an enum; in particular things like order and equality are only determined by the content of the wrapped strings. Replaced std::rt:logging::SendableString with SendStr Added tests for using an SendStr as key in Hash- and Treemaps
2013-09-14std::logging: Use a more specific enum than Eitherblake2-ppc-3/+2
2013-09-05Rename str::from_bytes to str::from_utf8, closes #8985Florian Hahn-1/+1
2013-08-28Remove @io::Writer from sys/repr/reflectAlex Crichton-2/+13
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-27librustc: Ensure that type parameters are in the right positions in paths.Patrick Walton-2/+2
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-15Add ToCStr method .with_c_str()Kevin Ballard-4/+4
.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-09auto merge of #8296 : erickt/rust/remove-str-trailing-nulls, r=ericktbors-5/+5
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-2/+2
remove-str-trailing-nulls
2013-08-09Remove the C++ runtime. SayonaraBrian Anderson-50/+30
2013-08-09std: Fix perf of local allocations in newschedBrian Anderson-2/+2
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-06Merge commit 'd89ff7eef969aee6b493bc846b64d68358fafbcd' into ↵Erick Tryzelaar-4/+0
remove-str-trailing-nulls
2013-08-04std: replace str::as_c_str with std::c_strErick Tryzelaar-5/+5
2013-08-03std: Remove gc and stackwalkBrian Anderson-4/+0
These are both obsoleted by the forthcoming new GC.
2013-08-02librustc: Disallow "unsafe" for external functionsPatrick Walton-3/+1
2013-07-31Give tasks useful names. #2891Ben Blum-7/+14
2013-07-26Consolidate raw representations of rust valuesAlex Crichton-6/+1
This moves the raw struct layout of closures, vectors, boxes, and strings into a new `unstable::raw` module. This is meant to be a centralized location to find information for the layout of these values. As safe method, `repr`, is provided to convert a rust value to its raw representation. Unsafe methods to convert back are not provided because they are rarely used and too numerous to write an implementation for each (not much of a common pattern).
2013-07-23std and extra: use as_c_str instead of as_buf in a couple placesErick Tryzelaar-14/+6
These uses are assuming the strings are null terminated, so it should be using `as_c_str` instead of `as_buf`
2013-07-23std: move str::as_buf into StrSliceErick Tryzelaar-4/+5
2013-07-20librustc: Remove `pub extern` and `priv extern` from the language.Patrick Walton-4/+4
Place `pub` or `priv` on individual items instead.
2013-07-03Merge remote-tracking branch 'mozilla/master'Brian Anderson-33/+2
Conflicts: src/libextra/test.rs src/libstd/at_vec.rs src/libstd/cleanup.rs src/libstd/rt/comm.rs src/libstd/rt/global_heap.rs src/libstd/task/spawn.rs src/libstd/unstable/lang.rs src/libstd/vec.rs src/rt/rustrt.def.in src/test/run-pass/extern-pub.rs
2013-07-02std: Use the same task failure message as C++ rtBrian Anderson-2/+2
2013-06-24std: Make box annihilator work with newschedBrian Anderson-1/+4
2013-06-23Remove rust_call_tydesc_gluePhilipp Brüschweiler-23/+0
Towards #4812. Also includes some minor cleanups.
2013-06-23Remove intrinsic modulePhilipp Brüschweiler-9/+3
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-20Merge remote-tracking branch 'brson/io' into io-upstreamBrian Anderson-7/+12
Conflicts: src/rt/rust_builtin.cpp src/rt/rustrt.def.in
2013-06-19std: Make newsched failures log correctlyBrian Anderson-2/+11
2013-06-18replace #[inline(always)] with #[inline]. r=burningtree.Graydon Hoare-11/+11
2013-06-16Merge remote-tracking branch 'brson/io'Brian Anderson-5/+1
Conflicts: src/libstd/rt/comm.rs src/libstd/rt/mod.rs src/libstd/rt/sched.rs src/libstd/rt/task.rs src/libstd/rt/test.rs src/libstd/rt/tube.rs src/libstd/rt/uv/uvio.rs src/libstd/rt/uvio.rs src/libstd/task/spawn.rs
2013-06-13std::rt: Tasks must have an unwinder. SimplerBrian Anderson-5/+1
2013-06-09remove unused import warningsHuon Wilson-1/+0
2013-06-04sys: get rid of shape functionsDaniel Micay-14/+0
borrowed pointers already implement Eq and Ord with deep comparisons
2013-05-30Require documentation by default for libstdAlex Crichton-0/+2
Adds documentation for various things that I understand. Adds #[allow(missing_doc)] for lots of things that I don't understand.
2013-05-22libstd: Rename libcore to libstd and libstd to libextra; update makefiles.Patrick Walton-0/+352
This only changes the directory names; it does not change the "real" metadata names.
2011-12-14Remove some duplicated unused parts of std now that they're present in core.Graydon Hoare-96/+0
2011-12-06Establish 'core' library separate from 'std'.Graydon Hoare-0/+96