Commit Graph

74 Commits

Author SHA1 Message Date
Simon BD
f2216ec9d0 Move binarysort out of MergeState 2012-10-24 20:42:41 -05:00
Simon BD
98c8a40828 Remove commented out code 2012-10-24 20:38:34 -05:00
Simon BD
8e6d209914 Remove and comment out more MergeState code 2012-10-24 20:36:10 -05:00
Simon BD
046460c7f6 Remove some code that MergeState used to prevent double frees 2012-10-24 19:21:39 -05:00
Simon BD
19a59cb748 Fix tests for Copy bound 2012-10-24 19:17:24 -05:00
Simon BD
fb61f915db Add copy bound to sort 2012-10-24 19:15:11 -05:00
Simon BD
e0a9d41b04 Re-add bad Ord impl test 2012-10-22 22:04:14 -05:00
Simon BD
254a86e49e Fix typo 2012-10-22 21:53:37 -05:00
Simon BD
781e446e26 Fix long line 2012-10-22 21:49:47 -05:00
Simon BD
1380776d36 Use explicit self 2012-10-22 21:44:43 -05:00
Simon BD
71c311cec5 Uncomment tests and fix binarysort segmentation fault 2012-10-22 21:42:09 -05:00
Simon BD
cc0f2c6bb2 Merge remote-tracking branch 'original/incoming' into incoming 2012-10-22 18:33:41 -05:00
Simon BD
9aec7a3e85 Fix up tests, export tim_sort 2012-10-22 18:33:28 -05:00
Tim Chevalier
90d06b80fd Make moves explicit in std tests 2012-10-12 20:43:37 -07:00
Simon BD
d4a54837d4 Add a test to check that badly written Ord impl do not cause double frees 2012-10-06 13:07:29 -05:00
Simon BD
eee86d4340 Remove debug info 2012-10-06 12:44:56 -05:00
Simon BD
74246d47fd Finish up tests, uncomment when ICE is fixed. 2012-10-04 21:35:03 -05:00
Simon BD
7bd48b92d9 Get tim_sort working, add test for double-freeing elements in tmp 2012-10-04 11:24:55 -05:00
Simon BD
efcd2385ea Merge remote-tracking branch 'original/incoming' into incoming
Conflicts:
	src/libstd/json.rs
	src/libstd/sort.rs
2012-10-03 21:47:09 -05:00
Simon BD
44f8a4401a Backup changes before pull from incoming 2012-10-03 21:41:53 -05:00
Simon BD
0ec5c9af9b Add cleanup code so the the array remains in a valid state if a comparison fails 2012-10-03 09:51:05 -05:00
Simon BD
579c7e3ef1 Make local variables and methods use underscores not camel case 2012-10-01 11:34:04 -05:00
Brian Anderson
bc9efaad9c std: Eliminate deprecated patterns 2012-09-28 00:22:28 -07:00
Simon BD
4d30d7ff04 Add a simple testsuite for timsort 2012-09-27 21:01:43 -05:00
Simon BD
f7be2d92a4 Export timsort 2012-09-27 20:56:13 -05:00
Simon BD
f34c4f4b04 Remove trailing whitespace 2012-09-27 20:44:14 -05:00
Graydon Hoare
fe62ff465c De-mode std::{treemap,sort}. Part of #3583. 2012-09-27 18:21:32 -07:00
Simon BD
868d10160f Put function argument last in sort function. Fixes #3265. 2012-09-27 19:05:13 -05:00
Simon BD
f98f00f7f6 Fix timsort to use updated vec::reserve 2012-09-27 18:15:57 -05:00
Niko Matsakis
67a8e7128a Demode vec::push (and convert to method) 2012-09-26 18:02:07 -07:00
Simon BD
cef7763649 Add timsort to std/sort 2012-09-25 17:53:24 -05:00
Niko Matsakis
3d59ac3a19 De-mode vec::map, vec::eachi, vec::rev_each, vec::rev_eachi 2012-09-21 19:13:55 -07:00
Graydon Hoare
dffe188991 Install new pub/priv/export rules as defaults, old rules accessible under #[legacy_exports]; 2012-09-21 18:11:43 -07:00
Niko Matsakis
9cf271fe96 De-mode vec::each() and many of the str iteration routines
Note that the method foo.each() is not de-moded, nor the other
vec routines.
2012-09-19 10:52:59 -07:00
Niko Matsakis
8d4928f780 Revert "replace explicit calls to vec::each with vec::each_ref, partially demode str"
This reverts commit 1be24f0758.

Not quite ready.
2012-09-18 21:41:13 -07:00
Niko Matsakis
1be24f0758 replace explicit calls to vec::each with vec::each_ref, partially demode str 2012-09-18 21:31:00 -07:00
Brian Anderson
2cdb23bbc0 Replace uses of 'unchecked' with 'unsafe' 2012-09-18 11:31:57 -07:00
Brian Anderson
3bd1f32cd9 Convert all kind bounds to camel case. Remove send, owned keywords. 2012-09-07 18:10:11 -07:00
Tim Chevalier
55bd6cee2f Test that merge sort is stable -- thanks to Jesse Jones
Closes #3399
2012-09-06 12:11:48 -07:00
Brian Anderson
8182497359 std: Camel case sort 2012-09-04 14:37:47 -07:00
Patrick Walton
2d690ae43f libstd: "import" -> "use" 2012-09-04 11:23:53 -07:00
Patrick Walton
8f840f9ea0 libstd: Implement a Sort trait.
This depends on the previous fix to not assert.
2012-09-03 15:59:10 -07:00
Kevin Cantu
134e5c85a2 Demode sort.rs 2012-09-01 13:08:20 -07:00
Tim Chevalier
4128cc4cb4 Make utility funs in core::int, core::uint, etc. not by-reference
Closes #3302
2012-08-31 16:21:47 -07:00
Jed Davis
c5528198ab De-abstract std::sort:qsort3, which uses only the trait-based lt/eq.
quick_sort3 was converted from fn parameters to traits in d9cdddeb, but
was still passing around closures over core::cmp::{eq,lt} internally,
and LLVM doesn't and/or can't pick up that they're effectively constant.

Reduces time spent to sort a large random ~[uint] by 16% in my testing.
2012-08-28 06:37:06 -07:00
Paul Stansifer
29f32b4a72 m1!{...} -> m1!(...) 2012-08-23 11:14:14 -07:00
Brian Anderson
5394e34aa4 core: Camel case some lesser-used modules 2012-08-13 18:59:48 -07:00
Niko Matsakis
97452c0ca1 Remove modes from map API and replace with regions.
API is (for now) mostly by value, there are options to use it by
reference if you like.  Hash and equality functions must be pure
and by reference (forward looking to the day when something
like send_map becomes the standard map).
2012-08-02 15:53:28 -07:00
Brian Anderson
b355936b4d Convert ret to return 2012-08-01 19:16:06 -07:00
Paul Stansifer
a9cc5066ee Change syntax extension syntax: #m[...] -> m!{...}. 2012-07-30 18:38:15 -07:00