Luqman Aden
5912b1448c
libcore: Get rid of move
.
2013-02-15 02:49:54 -08:00
bors
9727008ed0
auto merge of #4944 : catamorphism/rust/xxx-to-fixme, r=catamorphism
2013-02-14 23:11:13 -08:00
bors
5a9da65dc9
auto merge of #4937 : luqmana/rust/remove-mut-addr-of, r=catamorphism
2013-02-14 19:16:07 -08:00
Luqman Aden
206757f868
libcore: replace mut_addr_of properly on mac
2013-02-14 18:36:10 -08:00
Luqman Aden
cc89029942
libcore: Remove ptr::mut_addr_of since &mut is coerced to *mut
2013-02-14 18:36:10 -08:00
bors
20fd0c53ed
auto merge of #4938 : thestinger/rust/no_zero, r=brson
...
I removed the unused wrappers methods named `calloc` because they relied on the malloc wrapper having a `bool zero = true` default parameter (which resulted in some accidental zeroing). Perhaps wrapping the actual calloc function would be useful, but I don't know of an existing use case that could use it so I just removed these.
This gives an ~1% performance improvement for TreeMap, which does a lot of small allocations. Vectors use `realloc` which didn't zero before these changes so there's no measurable change in performance.
2013-02-14 18:27:54 -08:00
Tim Chevalier
dcb98f4097
core: Clean up XXXes
2013-02-14 18:17:56 -08:00
bors
3c07d037cd
auto merge of #4934 : nickdesaulniers/rust/issue4524cleanup, r=brson
...
review? @brson
Issue #4524
2013-02-14 15:37:48 -08:00
Patrick Walton
9143688197
librustc: Replace impl Type : Trait
with impl Trait for Type
. rs=implflipping
2013-02-14 14:44:12 -08:00
Nick Desaulniers
4699ac67c6
Remove all final references to die!
2013-02-14 13:09:09 -08:00
Daniel Micay
22e88d510f
stop zeroing all exchange allocations
2013-02-14 15:59:15 -05:00
Patrick Walton
216e85fadf
libcore: Move the numeric operations out of Num. r=brson
...
Sadly I could not use trait inheritance due to a type parameter substitution
bug.
2013-02-14 08:14:01 -08:00
Nick Desaulniers
4445b38df2
Remove die!, raplace invocations with fail! Issue #4524 pt 3
2013-02-13 17:01:32 -08:00
bors
d5bf3b85d1
auto merge of #4908 : bstrie/rust/rimov3, r=pcwalton
...
This patch finishes removing inner vector mutability from the vast majority of the compiler. Exceptions:
* core::dvec: ideally this entire type will be able to be replaced by `~[]`, but Niko asked me to hold off on removing Dvecs until he makes some fixes to borrowed pointers.
* liveness: liveness.rs is an impenetrable neutron star of deprecated semantics.
* compile-fail: I'm not sure if a lot of these tests are testing inner mutability or mutability in general. I figure that RIMOVing this folder should wait until this syntax is removed from the parser.
I also took this chance to remove many of the inner-mutability-related functions from core::vec, or as many uses of those functions as possible where still necessary. consume_mut and append_mut have been axed. cast_to_mut and cast_from_mut are still needed in a few places.
2013-02-13 15:09:07 -08:00
Graydon Hoare
e5aa399e0d
rustc and std: teach about #[bench], modernize to use quote_expr! some.
2013-02-13 11:46:25 -08:00
Graydon Hoare
73280b0472
core: add abs to num.
2013-02-13 11:46:25 -08:00
Graydon Hoare
389125aeb8
core: add min and max to cmp, re-export various places.
2013-02-13 11:46:25 -08:00
Ben Striegel
e6c82c0375
RIMOV core::vec
...
Also remove as many uses as possible of vec::cast_to_mut and
cast_from_mut
2013-02-13 12:48:24 -05:00
Ben Striegel
4de76aeb14
RIMOV core::hash
2013-02-13 12:47:44 -05:00
Ben Striegel
808ccd3349
RIMOV core::io
2013-02-13 12:47:44 -05:00
Ben Striegel
3a3f7b8e55
RIMOV core::rand
2013-02-13 12:47:44 -05:00
Ben Striegel
2d2ed075e3
RIMOV core::run
2013-02-13 12:47:43 -05:00
bors
6016214101
auto merge of #4900 : luqmana/rust/core_os_errors, r=graydon
...
Rewrote the last pull request (#4859 ) to not require on llvm for core.
Also fixes #2269 .
2013-02-12 21:27:22 -08:00
bors
27b3e01377
auto merge of #4914 : nikomatsakis/rust/issue-4856, r=nikomatsakis
...
and then adjust code to match. rs=unsound (will review post-landing)
rs=unsound
2013-02-12 20:40:19 -08:00
Niko Matsakis
ab2534974c
Adjust borrow checker algorithm to address #4856 unsoundness,
...
and then adjust code to match. rs=unsound (will review post-landing)
2013-02-12 20:10:50 -08:00
bors
6727c6fb56
auto merge of #4881 : bjz/rust/incoming, r=catamorphism
2013-02-12 16:22:58 -08:00
bors
91c59f5c9a
auto merge of #4880 : erickt/rust/hashmap-cleanup, r=catamorphism
2013-02-12 15:24:42 -08:00
bors
bc2d147847
auto merge of #4858 : z0w0/rust/rm_weak_task_count, r=graydon
2013-02-12 14:36:33 -08:00
bors
210fa2d017
auto merge of #4874 : thestinger/rust/option, r=catamorphism
2013-02-12 10:35:12 -08:00
Luqman Aden
44b80ed0d6
Long lines.
2013-02-11 23:49:49 -05:00
Luqman Aden
70185fdcc2
rt: remove last_os_error and adjust tests.
2013-02-11 23:49:49 -05:00
Luqman Aden
625fac3c7e
core: Rewrite last_os_error in Rust for windows as well.
2013-02-11 23:49:49 -05:00
Luqman Aden
9877d98b8f
core: Rewrite last_os_error in Rust for unix and provide access to errno (unix) and GetLastError (windows).
2013-02-11 23:49:49 -05:00
Zack Corr
0db527e2f8
core: Fix dec/inc_kernel_live_count mixup
2013-02-12 12:27:19 +10:00
Zack Corr
33ae05871c
core: Fix files that needed GenericChan/Port from prelude
2013-02-11 12:11:23 +10:00
Brendan Zabarauskas
48b2141b83
Add NumCast trait for generic numeric type casts
2013-02-11 12:33:05 +11:00
Erick Tryzelaar
4fb4a4b66d
core: add LinearMap::find_or_insert{,_with}
...
This allows for inserting a new value into the map only if it doesn't
already exist in the map.
2013-02-10 15:51:25 -08:00
Erick Tryzelaar
849644b5bc
core: rename hashmap test functions
2013-02-10 15:51:25 -08:00
Erick Tryzelaar
fed5df8f2e
libcore: LinearMap doesn't need to pass around the bucket vec
2013-02-10 15:51:25 -08:00
Daniel Micay
99ff74c1bd
make Option's iter method use a lifetime
2013-02-10 16:30:17 -05:00
Zack Corr
4f843763a1
core: Remove GenericChan/Port from prelude. Closes #4762
2013-02-10 18:10:09 +10:00
bors
d90abd5879
auto merge of #4848 : nikomatsakis/rust/issue-4821-bad-kind-computation, r=catamorphism
...
...ear
values to be copied. Rewrite kind computation so that instead of directly
computing the kind it computes what kinds of values are present in the type,
and then derive kinds based on that. I find this easier to think about.
Fixes #4821 .
r? @catamorphism
2013-02-09 10:20:55 -08:00
Zack Corr
ebd20b7944
Rename dec/inc_weak_task_count to inc/dec_live_count and remove register_task/unregister_task. Closes #4768
2013-02-09 19:19:31 +10:00
Niko Matsakis
a380df809c
Fix subtle error in caching during kind computation that could cause linear
...
values to be copied. Rewrite kind computation so that instead of directly
computing the kind it computes what kinds of values are present in the type,
and then derive kinds based on that. I find this easier to think about.
Fixes #4821 .
2013-02-08 07:20:39 -08:00
bors
e5637226d8
auto merge of #4839 : catamorphism/rust/rm-structural-records, r=catamorphism
2013-02-07 23:16:42 -08:00
Tim Chevalier
3b8f1fa2b6
core: Remove structural records from the rest of core, except pipes
...
That will, sadly, require one more snapshot.
2013-02-07 22:48:57 -08:00
Daniel Micay
9599cc86f0
implement BaseIter for LinearMap
2013-02-07 22:28:58 -05:00
Daniel Micay
3e0a28c7da
add a ReverseIter trait
2013-02-07 22:04:38 -05:00
Daniel Micay
e018244777
make Option's map and map_default use a lifetime
2013-02-07 22:04:38 -05:00
Daniel Micay
83270d2d79
rm each method from the Map trait
...
the map types should implement BaseIter instead
2013-02-07 22:04:35 -05:00