Remove vecs from std::sort

This commit is contained in:
Brian Anderson 2011-08-11 22:48:08 -07:00
parent abf41e15ea
commit 7625ed52ee
11 changed files with 57 additions and 225 deletions

View file

@ -155,7 +155,7 @@ fn sort_meta_items(items: &[@ast::meta_item]) -> [@ast::meta_item] {
let v: [mutable @ast::meta_item] = ~[mutable];
for mi: @ast::meta_item in items { v += ~[mutable mi]; }
std::sort::ivector::quick_sort(lteq, v);
std::sort::quick_sort(lteq, v);
let v2: [@ast::meta_item] = ~[];
for mi: @ast::meta_item in v { v2 += ~[mi]; }

View file

@ -552,7 +552,7 @@ fn encode_crate_deps(ebml_w: &ebmlivec::writer, cstore: &cstore::cstore) {
fn lteq(kv1: &numname, kv2: &numname) -> bool {
kv1.crate <= kv2.crate
}
std::sort::ivector::quick_sort(lteq, pairs);
std::sort::quick_sort(lteq, pairs);
// Sanity-check the crate numbers
let expected_cnum = 1;

View file

@ -460,7 +460,7 @@ fn create_vtbl(cx: @local_ctxt, sp: &span, outer_obj_ty: ty::t,
// Sort and process all the methods.
let meths =
std::sort::ivector::merge_sort[@ast::method]
std::sort::merge_sort[@ast::method]
(bind ast_mthd_lteq(_, _), ob.methods);
for m: @ast::method in meths {
@ -504,7 +504,7 @@ fn create_vtbl(cx: @local_ctxt, sp: &span, outer_obj_ty: ty::t,
// Sort all the methods and process them.
meths =
std::sort::ivector::merge_sort[vtbl_mthd]
std::sort::merge_sort[vtbl_mthd]
(bind vtbl_mthd_lteq(_, _), meths);
// To create forwarding methods, we'll need a "backwarding" vtbl. See

View file

@ -1991,7 +1991,7 @@ fn sort_methods(meths: &[method]) -> [method] {
fn method_lteq(a: &method, b: &method) -> bool {
ret str::lteq(a.ident, b.ident);
}
ret std::sort::ivector::merge_sort[method](bind method_lteq(_, _), meths);
ret std::sort::merge_sort[method](bind method_lteq(_, _), meths);
}
fn is_lval(expr: &@ast::expr) -> bool {