Skip to content

Commit 773a4e8

Browse files
committed
---
yaml --- r: 147406 b: refs/heads/try2 c: 6f16df4 h: refs/heads/master v: v3
1 parent 97f7e04 commit 773a4e8

File tree

39 files changed

+1539
-789
lines changed

39 files changed

+1539
-789
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 9b1e7db71c3a71c7a9f89f765e9d500c48539bfe
8+
refs/heads/try2: 6f16df4aa3b5de7529ff209c909118d7ed1d962d
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/mk/clean.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ clean-generic-$(2)-$(1):
6363
-name '*.[odasS]' -o \
6464
-name '*.so' -o \
6565
-name '*.dylib' -o \
66-
-name '*.lib' -o \
6766
-name '*.dll' -o \
6867
-name '*.def' -o \
6968
-name '*.bc' \

branches/try2/mk/tests.mk

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -908,8 +908,6 @@ define DEF_RMAKE_FOR_T_H
908908
# $(2) target triple
909909
# $(3) host triple
910910

911-
912-
ifeq ($(2)$(3),$$(CFG_BUILD)$$(CFG_BUILD))
913911
check-stage$(1)-T-$(2)-H-$(3)-rmake-exec: \
914912
$$(call TEST_OK_FILE,$(1),$(2),$(3),rmake)
915913

@@ -929,13 +927,6 @@ $(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok: \
929927
"$$(CC_$(3)) $$(CFG_GCCISH_CFLAGS_$(3))" \
930928
$$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3))
931929
@touch $$@
932-
else
933-
# FIXME #11094 - The above rule doesn't work right for multiple targets
934-
check-stage$(1)-T-$(2)-H-$(3)-rmake-exec:
935-
@true
936-
937-
endif
938-
939930

940931
endef
941932

branches/try2/src/etc/ctags.rust

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
--regex-Rust=/^[ \t]*(pub[ \t]+)?fn[ \t]+([a-zA-Z0-9_]+)/\2/f,functions,function definitions/
44
--regex-Rust=/^[ \t]*(pub[ \t]+)?type[ \t]+([a-zA-Z0-9_]+)/\2/T,types,type definitions/
55
--regex-Rust=/^[ \t]*(pub[ \t]+)?enum[ \t]+([a-zA-Z0-9_]+)/\2/g,enum,enumeration names/
6+
--regex-Rust=/^[ \t]*(pub[ \t]+)?enum[ \t]+([a-zA-Z0-9_]+)/\2/g,enum,enumeration names/
67
--regex-Rust=/^[ \t]*(pub[ \t]+)?struct[ \t]+([a-zA-Z0-9_]+)/\2/s,structure names/
78
--regex-Rust=/^[ \t]*(pub[ \t]+)?mod[ \t]+([a-zA-Z0-9_]+)/\2/m,modules,module names/
89
--regex-Rust=/^[ \t]*(pub[ \t]+)?static[ \t]+([a-zA-Z0-9_]+)/\2/c,consts,static constants/
910
--regex-Rust=/^[ \t]*(pub[ \t]+)?trait[ \t]+([a-zA-Z0-9_]+)/\2/t,traits,traits/
1011
--regex-Rust=/^[ \t]*(pub[ \t]+)?impl([ \t\n]+<.*>)?[ \t]+([a-zA-Z0-9_]+)/\3/i,impls,trait implementations/
11-
--regex-Rust=/^[ \t]*macro_rules![ \t]+([a-zA-Z0-9_]+)/\1/d,macros,macro definitions/
12+
--regex-Rust=/^[ \t]*macro_rules![ \t]+([a-zA-Z0-9_]+)/\2/d,macros,macro definitions/

branches/try2/src/libextra/glob.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ use std::io;
2828
use std::io::fs;
2929
use std::path::is_sep;
3030

31+
use sort;
32+
3133
/**
3234
* An iterator that yields Paths from the filesystem that match a particular
3335
* pattern - see the `glob` function for more details.
@@ -147,8 +149,9 @@ impl Iterator<Path> for GlobIterator {
147149

148150
fn list_dir_sorted(path: &Path) -> ~[Path] {
149151
match io::result(|| fs::readdir(path)) {
150-
Ok(mut children) => {
151-
children.sort_by(|p1, p2| p2.filename().cmp(&p1.filename()));
152+
Ok(children) => {
153+
let mut children = children;
154+
sort::quick_sort(children, |p1, p2| p2.filename() <= p1.filename());
152155
children
153156
}
154157
Err(..) => ~[]
@@ -768,3 +771,4 @@ mod test {
768771
assert!(Pattern::new("a/b").matches_path(&Path::new("a/b")));
769772
}
770773
}
774+

branches/try2/src/libextra/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ pub mod ringbuf;
6161
pub mod priority_queue;
6262
pub mod smallintmap;
6363

64+
pub mod sort;
65+
6466
pub mod dlist;
6567
pub mod treemap;
6668
pub mod btree;

branches/try2/src/libextra/priority_queue.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ impl<T: Ord> Extendable<T> for PriorityQueue<T> {
213213

214214
#[cfg(test)]
215215
mod tests {
216+
use sort::merge_sort;
216217
use priority_queue::PriorityQueue;
217218

218219
#[test]
@@ -230,8 +231,7 @@ mod tests {
230231
#[test]
231232
fn test_top_and_pop() {
232233
let data = ~[2u, 4, 6, 2, 1, 8, 10, 3, 5, 7, 0, 9, 1];
233-
let mut sorted = data.clone();
234-
sorted.sort();
234+
let mut sorted = merge_sort(data, |x, y| x.le(y));
235235
let mut heap = PriorityQueue::from_vec(data);
236236
while !heap.is_empty() {
237237
assert_eq!(heap.top(), sorted.last());
@@ -311,14 +311,11 @@ mod tests {
311311
assert_eq!(heap.len(), 5);
312312
}
313313

314-
fn check_to_vec(mut data: ~[int]) {
314+
fn check_to_vec(data: ~[int]) {
315315
let heap = PriorityQueue::from_vec(data.clone());
316-
let mut v = heap.clone().to_vec();
317-
v.sort();
318-
data.sort();
319-
320-
assert_eq!(v, data);
321-
assert_eq!(heap.to_sorted_vec(), data);
316+
assert_eq!(merge_sort(heap.clone().to_vec(), |x, y| x.le(y)),
317+
merge_sort(data, |x, y| x.le(y)));
318+
assert_eq!(heap.to_sorted_vec(), merge_sort(data, |x, y| x.le(y)));
322319
}
323320

324321
#[test]

0 commit comments

Comments
 (0)