about summary refs log tree commit diff
path: root/src/libstd/unstable/lang.rs
AgeCommit message (Collapse)AuthorLines
2014-02-23std: Remove unstable::langBrian Anderson-52/+0
Put the lonely lang items here closer to the code they are calling.
2014-02-17Made fail_bounds_check more careful with strings.chromatic-2/+12
Fixes GH #11976.
2014-02-13Register new snapshotsAlex Crichton-8/+0
2014-02-07remove type descriptors from proc and @TDaniel Micay-0/+8
This also drops support for the managed pointer POISON_ON_FREE feature as it's not worth adding back the support for it. After a snapshot, the leftovers can be removed.
2014-01-22Replace C types with Rust types in libstd, closes #7313Florian Hahn-7/+6
2014-01-21Purge borrowck from libstdAlex Crichton-40/+0
This hasn't been in use since `@mut` was removed
2014-01-15libstd: Added more #[inline] annotations and replaced uses of `libc::abort` ↵Eduard Burtescu-0/+2
with the intrinsic.
2013-12-24green: Rip the bandaid off, introduce libgreenAlex Crichton-15/+1
This extracts everything related to green scheduling from libstd and introduces a new libgreen crate. This mostly involves deleting most of std::rt and moving it to libgreen. Along with the movement of code, this commit rearchitects many functions in the scheduler in order to adapt to the fact that Local::take now *only* works on a Task, not a scheduler. This mostly just involved threading the current green task through in a few locations, but there were one or two spots where things got hairy. There are a few repercussions of this commit: * tube/rc have been removed (the runtime implementation of rc) * There is no longer a "single threaded" spawning mode for tasks. This is now encompassed by 1:1 scheduling + communication. Convenience methods have been introduced that are specific to libgreen to assist in the spawning of pools of schedulers.
2013-11-26libstd: Remove all non-`proc` uses of `do` from libstdPatrick Walton-3/+1
2013-10-30Prepared `std::sys` for removal, and made `begin_unwind` simplerMarvin Löbel-1/+1
- `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-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-23mark some functions as returning !Daniel Micay-2/+1
Closes #10023
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-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-09-30std: Remove usage of fmt!Alex Crichton-2/+2
2013-09-23Register new snapshotsAlex Crichton-15/+0
2013-09-18librustc/libstd: No longer pass crate_map to start.Luqman Aden-0/+14
2013-08-27librustc: Ensure that type parameters are in the right positions in paths.Patrick Walton-2/+3
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-16Remove the annihilate lang itemBrian Anderson-5/+0
2013-08-15Add ToCStr method .with_c_str()Kevin Ballard-1/+1
.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-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-11fix unused importsDaniel Micay-2/+1
2013-08-11move `strdup_uniq` lang item to std::strDaniel Micay-6/+0
2013-08-09auto merge of #8296 : erickt/rust/remove-str-trailing-nulls, r=ericktbors-1/+2
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-10/+7
remove-str-trailing-nulls
2013-08-09Remove the C++ runtime. SayonaraBrian Anderson-46/+12
2013-08-09std: Fix perf of local allocations in newschedBrian Anderson-10/+7
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-04std: replace str::as_c_str with std::c_strErick Tryzelaar-1/+2
2013-08-02librustc: Disallow "unsafe" for external functionsPatrick Walton-9/+4
2013-08-02auto merge of #8175 : brson/rust/nodbg, r=graydonbors-2/+0
This stuff is ancient, unused, and tied to oldsched
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-07-31extra: Remove dbg module and rt support codeBrian Anderson-2/+0
This stuff is ancient, unused, and tied to oldsched
2013-07-25libstd: Fix errors when rtdebug! is not a noop.Luqman Aden-2/+2
2013-07-23std and extra: use as_c_str instead of as_buf in a couple placesErick Tryzelaar-2/+2
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-1/+1
2013-07-20librustc: Remove `pub extern` and `priv extern` from the language.Patrick Walton-8/+9
Place `pub` or `priv` on individual items instead.
2013-07-03Merge remote-tracking branch 'mozilla/master'Brian Anderson-24/+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-01Refactored the runtime to view coroutines as a component of tasks, instead ↵toddaaro-0/+4
of tasks as a component of coroutines.
2013-06-30simplify the exchange allocatorDaniel Micay-17/+0
* stop using an atomic counter, this has a significant cost and valgrind will already catch these leaks * remove the extra layer of function calls * remove the assert of non-null in free, freeing null is well defined but throwing a failure from free will not be * stop initializing the `prev`/`next` pointers * abort on out-of-memory, failing won't necessarily work
2013-06-24std: Make box annihilator work with newschedBrian Anderson-13/+6
2013-06-24std: Move dynamic borrowck code from unstable::lang to rt::borrowckBrian Anderson-228/+7
2013-06-20Merge remote-tracking branch 'brson/io' into io-upstreamBrian Anderson-2/+2
Conflicts: src/rt/rust_builtin.cpp src/rt/rustrt.def.in
2013-06-21libstd: cleanup warningsJames Miller-14/+2
2013-06-18replace #[inline(always)] with #[inline]. r=burningtree.Graydon Hoare-7/+7
2013-06-16Merge remote-tracking branch 'brson/io'Brian Anderson-2/+2
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-10debugged a compiler ICE when merging local::borrow changes into the main io ↵toddaaro-2/+2
branch and modified the incoming new file lang.rs to be api-compatible
2013-06-10std: convert str::reserve* to methods, and methodise str::push_*.Huon Wilson-3/+3
2013-06-09std: add reverse vec iterators, replace vec::each*_reverse.Huon Wilson-1/+2