Skip to content

Commit b1bd25a

Browse files
committed
---
yaml --- r: 16299 b: refs/heads/try c: db31969 h: refs/heads/master i: 16297: 46dcf7e 16295: 967eb82 v: v3
1 parent 0c56af9 commit b1bd25a

33 files changed

+137
-254
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: a760958b52d3580ffba4d93f7c4732876893fc2a
5+
refs/heads/try: db31969d4a10316169cfce858e10742cd588575e
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/Makefile.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -421,9 +421,9 @@ else
421421
TSREQS := \
422422
$(foreach target,$(CFG_TARGET_TRIPLES), \
423423
$(SREQ3_T_$(target)_H_$(CFG_HOST_TRIPLE)))
424-
FUZZ := $(HBIN2_H_$(CFG_HOST_TRIPLE))/fuzzer$(X)
425-
CARGO := $(HBIN2_H_$(CFG_HOST_TRIPLE))/cargo$(X)
426-
RUSTDOC := $(HBIN2_H_$(CFG_HOST_TRIPLE))/rustdoc$(X)
424+
FUZZ := $(HBIN3_H_$(CFG_HOST_TRIPLE))/fuzzer$(X)
425+
CARGO := $(HBIN3_H_$(CFG_HOST_TRIPLE))/cargo$(X)
426+
RUSTDOC := $(HBIN3_H_$(CFG_HOST_TRIPLE))/rustdoc$(X)
427427

428428
all: rustc $(GENERATED) docs $(FUZZ) $(CARGO) $(RUSTDOC)
429429

branches/try/src/libcore/cmp.rs

Lines changed: 0 additions & 10 deletions
This file was deleted.

branches/try/src/libcore/core.rc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ export comm, task, future;
4343
export extfmt;
4444
export tuple;
4545
export to_str;
46-
export swappable;
4746
export dvec, dvec_iter;
48-
export cmp;
4947

5048
// NDM seems to be necessary for resolve to work
5149
export option_iter;
@@ -154,7 +152,6 @@ mod tuple;
154152

155153
// Ubiquitous-utility-type modules
156154

157-
mod cmp;
158155
mod either;
159156
mod iter;
160157
mod logging;
@@ -166,7 +163,6 @@ mod option_iter {
166163
}
167164
mod result;
168165
mod to_str;
169-
mod swappable;
170166
mod dvec;
171167
#[path="iter-trait"]
172168
mod dvec_iter {

branches/try/src/libcore/int-template.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import T = inst::T;
2-
import cmp::{eq, ord};
32

43
export min_value, max_value;
54
export min, max;
@@ -11,7 +10,6 @@ export range;
1110
export compl;
1211
export abs;
1312
export parse_buf, from_str, to_str, to_str_bytes, str;
14-
export ord, eq;
1513

1614
const min_value: T = -1 as T << (inst::bits - 1 as T);
1715
const max_value: T = min_value - 1 as T;
@@ -110,18 +108,6 @@ fn to_str_bytes<U>(n: T, radix: uint, f: fn([u8]/&) -> U) -> U {
110108
#[doc = "Convert to a string"]
111109
fn str(i: T) -> str { ret to_str(i, 10u); }
112110

113-
impl ord of ord for T {
114-
fn lt(&&other: T) -> bool {
115-
ret self < other;
116-
}
117-
}
118-
119-
impl eq of eq for T {
120-
fn eq(&&other: T) -> bool {
121-
ret self == other;
122-
}
123-
}
124-
125111

126112
// FIXME: Has alignment issues on windows and 32-bit linux
127113
#[test]

branches/try/src/libcore/swappable.rs

Lines changed: 0 additions & 98 deletions
This file was deleted.

branches/try/src/libcore/uint-template.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import T = inst::T;
2-
import cmp::{eq, ord};
32

43
export min_value, max_value;
54
export min, max;
@@ -11,7 +10,6 @@ export range;
1110
export compl;
1211
export to_str, to_str_bytes;
1312
export from_str, from_str_radix, str, parse_buf;
14-
export ord, eq;
1513

1614
const min_value: T = 0 as T;
1715
const max_value: T = 0 as T - 1 as T;
@@ -51,18 +49,6 @@ pure fn compl(i: T) -> T {
5149
max_value ^ i
5250
}
5351

54-
impl ord of ord for T {
55-
fn lt(&&other: T) -> bool {
56-
ret self < other;
57-
}
58-
}
59-
60-
impl eq of eq for T {
61-
fn eq(&&other: T) -> bool {
62-
ret self == other;
63-
}
64-
}
65-
6652
#[doc = "
6753
Parse a buffer of bytes
6854

branches/try/src/libstd/sort.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#[doc = "Sorting methods"];
22
import vec::len;
3-
import int::{eq, ord};
43

54
export le;
65
export merge_sort;
@@ -142,6 +141,7 @@ fn qsort3<T: copy>(compare_func_lt: le<T>, compare_func_eq: le<T>,
142141
qsort3::<T>(compare_func_lt, compare_func_eq, arr, i, right);
143142
}
144143

144+
// FIXME: This should take lt and eq types (#2348)
145145
#[doc = "
146146
Fancy quicksort. Sorts a mut vector in place.
147147
@@ -152,17 +152,22 @@ According to these slides this is the algorithm of choice for
152152
153153
This is an unstable sort.
154154
"]
155-
fn quick_sort3<T: copy ord eq>(arr: [mut T]) {
155+
fn quick_sort3<T: copy>(compare_func_lt: le<T>, compare_func_eq: le<T>,
156+
arr: [mut T]) {
156157
if len::<T>(arr) == 0u { ret; }
157-
qsort3::<T>({ |x, y| x.lt(y) }, { |x, y| x.eq(y) }, arr, 0,
158+
qsort3::<T>(compare_func_lt, compare_func_eq, arr, 0,
158159
(len::<T>(arr) as int) - 1);
159160
}
160161

161162
#[cfg(test)]
162163
mod test_qsort3 {
163164
fn check_sort(v1: [mut int], v2: [mut int]) {
164165
let len = vec::len::<int>(v1);
165-
quick_sort3::<int>(v1);
166+
fn lt(&&a: int, &&b: int) -> bool { ret a < b; }
167+
fn equal(&&a: int, &&b: int) -> bool { ret a == b; }
168+
let f1 = lt;
169+
let f2 = equal;
170+
quick_sort3::<int>(f1, f2, v1);
166171
let mut i = 0u;
167172
while i < len {
168173
log(debug, v2[i]);

branches/try/src/libsyntax/diagnostic.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,11 @@ impl codemap_handler of handler for handler_t {
8686
}
8787
fn has_errors() -> bool { self.err_count > 0u }
8888
fn abort_if_errors() {
89-
let s;
90-
alt self.err_count {
91-
0u { ret; }
92-
1u { s = "aborting due to previous error"; }
93-
_ { s = #fmt["aborting due to %u previous errors",
94-
self.err_count]; }
89+
if self.err_count > 0u {
90+
let s = #fmt["aborting due to %u previous errors",
91+
self.err_count];
92+
self.fatal(s);
9593
}
96-
self.fatal(s);
9794
}
9895
fn warn(msg: str) {
9996
self.emit(none, msg, warning);

branches/try/src/rustc/back/link.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -637,11 +637,6 @@ fn link_binary(sess: session,
637637
// and binutils 2.22+ won't add them automatically
638638
if sess.targ_cfg.os == session::os_linux {
639639
cc_args += ["-lrt", "-ldl"];
640-
641-
// LLVM implements the `frem` instruction as a call to `fmod`,
642-
// which lives in libm. Similar to above, on some linuxes we
643-
// have to be explicit about linking to it. See #2510
644-
cc_args += ["-lm"];
645640
}
646641

647642
if sess.targ_cfg.os == session::os_freebsd {

branches/try/src/rustc/driver/driver.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ fn compile_upto(sess: session, cfg: ast::crate_cfg,
194194
bind middle::check_loop::check_crate(ty_cx, crate));
195195
time(time_passes, "alt checking",
196196
bind middle::check_alt::check_crate(ty_cx, crate));
197-
let last_use_map =
197+
let (last_use_map, spill_map) =
198198
time(time_passes, "liveness checking",
199199
bind middle::liveness::check_crate(ty_cx, method_map, crate));
200200
time(time_passes, "typestate checking",
@@ -216,7 +216,7 @@ fn compile_upto(sess: session, cfg: ast::crate_cfg,
216216
let maps = {mutbl_map: mutbl_map, root_map: root_map,
217217
copy_map: copy_map, last_use_map: last_use_map,
218218
impl_map: impl_map, method_map: method_map,
219-
vtable_map: vtable_map};
219+
vtable_map: vtable_map, spill_map: spill_map};
220220

221221
let (llmod, link_meta) =
222222
time(time_passes, "translation",

branches/try/src/rustc/driver/rustc.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ import std::map::hashmap;
1515
import getopts::{opt_present};
1616
import rustc::driver::driver::*;
1717
import syntax::codemap;
18-
import syntax::diagnostic;
19-
import rustc::driver::session;
18+
import rustc::driver::{diagnostic, session};
2019
import rustc::middle::lint;
2120
import io::reader_util;
2221

branches/try/src/rustc/metadata/decoder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ import syntax::{ast, ast_util};
77
import syntax::attr;
88
import middle::ty;
99
import syntax::ast_map;
10+
import common::*;
1011
import tydecode::{parse_ty_data, parse_def_id, parse_bounds_data,
1112
parse_ident};
1213
import syntax::print::pprust;
1314
import cmd=cstore::crate_metadata;
1415
import util::ppaux::ty_to_str;
1516
import ebml::deserializer;
1617
import syntax::diagnostic::span_handler;
17-
import common::*;
1818

1919
export class_dtor;
2020
export get_class_fields;

branches/try/src/rustc/middle/astencode.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ type maps = {
5757
impl_map: middle::resolve::impl_map,
5858
method_map: middle::typeck::method_map,
5959
vtable_map: middle::typeck::vtable_map,
60+
spill_map: middle::liveness::spill_map
6061
};
6162

6263
type decode_ctxt = @{
@@ -838,6 +839,12 @@ fn encode_side_tables_for_id(ecx: @e::encode_ctxt,
838839
}
839840
}
840841

842+
option::iter(maps.spill_map.find(id)) {|_m|
843+
ebml_w.tag(c::tag_table_spill) {||
844+
ebml_w.id(id);
845+
}
846+
}
847+
841848
option::iter(maps.last_use_map.find(id)) {|m|
842849
ebml_w.tag(c::tag_table_last_use) {||
843850
ebml_w.id(id);
@@ -946,6 +953,8 @@ fn decode_side_tables(xcx: extended_decode_ctxt,
946953
dcx.maps.mutbl_map.insert(id, ());
947954
} else if tag == (c::tag_table_copy as uint) {
948955
dcx.maps.copy_map.insert(id, ());
956+
} else if tag == (c::tag_table_spill as uint) {
957+
dcx.maps.spill_map.insert(id, ());
949958
} else {
950959
let val_doc = entry_doc[c::tag_table_val];
951960
let val_dsr = ebml::ebml_deserializer(val_doc);

0 commit comments

Comments
 (0)