Commit Graph

65 Commits

Author SHA1 Message Date
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
Gareth Daniel Smith
fe43d66613 replace core::tuple functions with methods 2012-07-16 22:33:20 +01:00
Michael Sullivan
1c62f5ff74 Get rid of all of the remaining /~s in the code base. 2012-07-12 15:13:18 -07:00
Gareth Daniel Smith
be0141666d convert doc-attributes to doc-comments using ./src/etc/sugarise-doc-comments.py (and manually tweaking) - for issue #2498 2012-07-04 19:18:13 -07:00
Brian Anderson
d1fc2b5995 Convert to new closure syntax 2012-07-01 19:19:32 -07:00
Michael Sullivan
98e161f00e Switch the compiler over to using ~[] notation instead of []/~. Closes #2759. 2012-06-29 17:41:45 -07:00
Eric Holk
0b84437b68 Replace more vector additions (issue #2719) 2012-06-27 22:49:05 -07:00
Michael Sullivan
329eca6044 Make vectors uglier ([]/~). Sorry. Should be temporary. Closes #2725. 2012-06-25 20:00:46 -07:00
Eric Holk
b19c98ea9a Some perf fixes, although vec::slice is still too slow (Issue #2719) 2012-06-25 16:38:12 -07:00
Tim Chevalier
a6c92f0a17 Revert "Revert "Merge pull request #2516 from mozilla/incoming" due to failures"
This reverts commit 9fae95860de510f6874810cf43efb83f101246ef.
2012-06-06 15:08:24 -07:00