Skip to content

Commit 9d35824

Browse files
committed
---
yaml --- r: 148478 b: refs/heads/try2 c: 50d0e07 h: refs/heads/master v: v3
1 parent 47b17bb commit 9d35824

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+508
-264
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: 232d8e560561e07b3ba54c5d0234816e50342fb3
8+
refs/heads/try2: 50d0e07065b7cc9a08427a009740abd12397fc9d
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/Makefile.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,11 @@ endif
124124
ifdef TRACE
125125
CFG_RUSTC_FLAGS += -Z trace
126126
endif
127+
ifndef DEBUG_BORROWS
128+
RUSTFLAGS_STAGE0 += -Z no-debug-borrows
129+
RUSTFLAGS_STAGE1 += -Z no-debug-borrows
130+
RUSTFLAGS_STAGE2 += -Z no-debug-borrows
131+
endif
127132

128133
# The executables crated during this compilation process have no need to include
129134
# static copies of libstd and libextra. We also generate dynamic versions of all

branches/try2/src/compiletest/compiletest.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,14 @@ pub fn parse_config(args: ~[~str]) -> config {
140140
adb_test_dir:
141141
opt_str2(matches.opt_str("adb-test-dir")).to_str(),
142142
adb_device_status:
143-
"arm-linux-androideabi" == opt_str2(matches.opt_str("target")) &&
144-
"(none)" != opt_str2(matches.opt_str("adb-test-dir")) &&
145-
!opt_str2(matches.opt_str("adb-test-dir")).is_empty(),
143+
if (opt_str2(matches.opt_str("target")) ==
144+
~"arm-linux-androideabi") {
145+
if (opt_str2(matches.opt_str("adb-test-dir")) !=
146+
~"(none)" &&
147+
opt_str2(matches.opt_str("adb-test-dir")) !=
148+
~"") { true }
149+
else { false }
150+
} else { false },
146151
test_shard: test::opt_shard(matches.opt_str("test-shard")),
147152
verbose: matches.opt_present("verbose")
148153
}

branches/try2/src/compiletest/runtest.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,9 +532,9 @@ fn check_expected_errors(expected_errors: ~[errors::ExpectedError],
532532
if !found_flags[i] {
533533
debug!("prefix={} ee.kind={} ee.msg={} line={}",
534534
prefixes[i], ee.kind, ee.msg, line);
535-
if prefix_matches(line, prefixes[i]) &&
535+
if (prefix_matches(line, prefixes[i]) &&
536536
line.contains(ee.kind) &&
537-
line.contains(ee.msg) {
537+
line.contains(ee.msg)) {
538538
found_flags[i] = true;
539539
was_expected = true;
540540
break;

branches/try2/src/libextra/ebml.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,15 +1025,15 @@ mod bench {
10251025
pub fn vuint_at_A_aligned(bh: &mut BenchHarness) {
10261026
use std::vec;
10271027
let data = vec::from_fn(4*100, |i| {
1028-
match i % 2 {
1028+
match (i % 2) {
10291029
0 => 0x80u8,
10301030
_ => i as u8,
10311031
}
10321032
});
10331033
let mut sum = 0u;
10341034
bh.iter(|| {
10351035
let mut i = 0;
1036-
while i < data.len() {
1036+
while (i < data.len()) {
10371037
sum += reader::vuint_at(data, i).val;
10381038
i += 4;
10391039
}
@@ -1044,15 +1044,15 @@ mod bench {
10441044
pub fn vuint_at_A_unaligned(bh: &mut BenchHarness) {
10451045
use std::vec;
10461046
let data = vec::from_fn(4*100+1, |i| {
1047-
match i % 2 {
1047+
match (i % 2) {
10481048
1 => 0x80u8,
10491049
_ => i as u8
10501050
}
10511051
});
10521052
let mut sum = 0u;
10531053
bh.iter(|| {
10541054
let mut i = 1;
1055-
while i < data.len() {
1055+
while (i < data.len()) {
10561056
sum += reader::vuint_at(data, i).val;
10571057
i += 4;
10581058
}
@@ -1063,7 +1063,7 @@ mod bench {
10631063
pub fn vuint_at_D_aligned(bh: &mut BenchHarness) {
10641064
use std::vec;
10651065
let data = vec::from_fn(4*100, |i| {
1066-
match i % 4 {
1066+
match (i % 4) {
10671067
0 => 0x10u8,
10681068
3 => i as u8,
10691069
_ => 0u8
@@ -1072,7 +1072,7 @@ mod bench {
10721072
let mut sum = 0u;
10731073
bh.iter(|| {
10741074
let mut i = 0;
1075-
while i < data.len() {
1075+
while (i < data.len()) {
10761076
sum += reader::vuint_at(data, i).val;
10771077
i += 4;
10781078
}
@@ -1083,7 +1083,7 @@ mod bench {
10831083
pub fn vuint_at_D_unaligned(bh: &mut BenchHarness) {
10841084
use std::vec;
10851085
let data = vec::from_fn(4*100+1, |i| {
1086-
match i % 4 {
1086+
match (i % 4) {
10871087
1 => 0x10u8,
10881088
0 => i as u8,
10891089
_ => 0u8
@@ -1092,7 +1092,7 @@ mod bench {
10921092
let mut sum = 0u;
10931093
bh.iter(|| {
10941094
let mut i = 1;
1095-
while i < data.len() {
1095+
while (i < data.len()) {
10961096
sum += reader::vuint_at(data, i).val;
10971097
i += 4;
10981098
}

branches/try2/src/libextra/enum_set.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ impl<E:CLike> Items<E> {
114114

115115
impl<E:CLike> Iterator<E> for Items<E> {
116116
fn next(&mut self) -> Option<E> {
117-
if self.bits == 0 {
117+
if (self.bits == 0) {
118118
return None;
119119
}
120120

branches/try2/src/libextra/getopts.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ impl Matches {
195195

196196
fn opt_val(&self, nm: &str) -> Option<Optval> {
197197
let vals = self.opt_vals(nm);
198-
if vals.is_empty() {
198+
if (vals.is_empty()) {
199199
None
200200
} else {
201201
Some(vals[0].clone())
@@ -797,7 +797,7 @@ pub mod groups {
797797
let slice: || = || { cont = it(ss.slice(slice_start, last_end)) };
798798

799799
// if the limit is larger than the string, lower it to save cycles
800-
if lim >= fake_i {
800+
if (lim >= fake_i) {
801801
lim = fake_i;
802802
}
803803

branches/try2/src/libextra/json.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,7 @@ impl<T : Iterator<char>> Parser<T> {
929929
return self.error(~"EOF while parsing string");
930930
}
931931

932-
if escape {
932+
if (escape) {
933933
match self.ch {
934934
'"' => res.push_char('"'),
935935
'\\' => res.push_char('\\'),
@@ -1360,7 +1360,7 @@ impl serialize::Decoder for Decoder {
13601360
/// Test if two json values are less than one another
13611361
impl Ord for Json {
13621362
fn lt(&self, other: &Json) -> bool {
1363-
match *self {
1363+
match (*self) {
13641364
Number(f0) => {
13651365
match *other {
13661366
Number(f1) => f0 < f1,

branches/try2/src/libextra/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ Rust extras are part of the standard Rust distribution.
2020
2121
*/
2222

23-
#[crate_id = "extra#0.10-pre"];
23+
// NOTE: upgrade to 0.10-pre after the next snapshot
24+
#[crate_id = "extra#0.9"];
2425
#[comment = "Rust extras"];
2526
#[license = "MIT/ASL2"];
2627
#[crate_type = "rlib"];

branches/try2/src/libextra/num/bigint.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -561,9 +561,9 @@ impl ToPrimitive for BigUint {
561561
impl FromPrimitive for BigUint {
562562
#[inline]
563563
fn from_i64(n: i64) -> Option<BigUint> {
564-
if n > 0 {
564+
if (n > 0) {
565565
FromPrimitive::from_u64(n as u64)
566-
} else if n == 0 {
566+
} else if (n == 0) {
567567
Some(Zero::zero())
568568
} else {
569569
None

branches/try2/src/libextra/terminfo/parser/compiled.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ pub fn parse(file: &mut io::Reader,
178178

179179
// Check magic number
180180
let magic = file.read_le_u16();
181-
if magic != 0x011A {
181+
if (magic != 0x011A) {
182182
return Err(format!("invalid magic number: expected {:x} but found {:x}",
183183
0x011A, magic as uint));
184184
}

branches/try2/src/libextra/time.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ pub fn strptime(s: &str, format: &str) -> Result<Tm, ~str> {
808808
/// Formats the time according to the format string.
809809
pub fn strftime(format: &str, tm: &Tm) -> ~str {
810810
fn days_in_year(year: int) -> i32 {
811-
if (year % 4 == 0) && ((year % 100 != 0) || (year % 400 == 0)) {
811+
if ((year % 4 == 0) && ((year % 100 != 0) || (year % 400 == 0))) {
812812
366 /* Days in a leap year */
813813
} else {
814814
365 /* Days in a non-leap year */
@@ -838,14 +838,14 @@ pub fn strftime(format: &str, tm: &Tm) -> ~str {
838838
let mut year: int = tm.tm_year as int + 1900;
839839
let mut days: int = iso_week_days (tm.tm_yday, tm.tm_wday);
840840

841-
if days < 0 {
841+
if (days < 0) {
842842
/* This ISO week belongs to the previous year. */
843843
year -= 1;
844844
days = iso_week_days (tm.tm_yday + (days_in_year(year)), tm.tm_wday);
845845
} else {
846846
let d: int = iso_week_days (tm.tm_yday - (days_in_year(year)),
847847
tm.tm_wday);
848-
if 0 <= d {
848+
if (0 <= d) {
849849
/* This ISO week belongs to the next year. */
850850
year += 1;
851851
days = d;

branches/try2/src/libextra/uuid.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -614,16 +614,16 @@ mod test {
614614

615615
// Test error reporting
616616
let e = Uuid::parse_string("67e5504410b1426f9247bb680e5fe0c").unwrap_err();
617-
assert!(match e { ErrorInvalidLength(n) => n==31, _ => false });
617+
assert!(match(e){ ErrorInvalidLength(n) => n==31, _ => false });
618618

619619
let e = Uuid::parse_string("67e550X410b1426f9247bb680e5fe0cd").unwrap_err();
620-
assert!(match e { ErrorInvalidCharacter(c, n) => c=='X' && n==6, _ => false });
620+
assert!(match(e){ ErrorInvalidCharacter(c, n) => c=='X' && n==6, _ => false });
621621

622622
let e = Uuid::parse_string("67e550-4105b1426f9247bb680e5fe0c").unwrap_err();
623-
assert!(match e { ErrorInvalidGroups(n) => n==2, _ => false });
623+
assert!(match(e){ ErrorInvalidGroups(n) => n==2, _ => false });
624624

625625
let e = Uuid::parse_string("F9168C5E-CEB2-4faa-B6BF1-02BF39FA1E4").unwrap_err();
626-
assert!(match e { ErrorInvalidGroupLength(g, n, e) => g==3 && n==5 && e==4, _ => false });
626+
assert!(match(e){ ErrorInvalidGroupLength(g, n, e) => g==3 && n==5 && e==4, _ => false });
627627
}
628628

629629
#[test]

branches/try2/src/libgreen/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
//! This can be optionally linked in to rust programs in order to provide M:N
1818
//! functionality inside of 1:1 programs.
1919
20-
#[crate_id = "green#0.10-pre"];
20+
// NOTE: Change to 0.10-pre after snapshot
21+
#[crate_id = "green#0.9"];
2122
#[license = "MIT/ASL2"];
2223
#[crate_type = "rlib"];
2324
#[crate_type = "dylib"];

branches/try2/src/libgreen/sched.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1323,7 +1323,7 @@ mod test {
13231323
fn roundtrip(id: int, n_tasks: int,
13241324
p: &Port<(int, Chan<()>)>,
13251325
ch: &Chan<(int, Chan<()>)>) {
1326-
loop {
1326+
while (true) {
13271327
match p.recv() {
13281328
(1, end_chan) => {
13291329
debug!("{}\n", id);

branches/try2/src/libnative/io/file.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -508,11 +508,11 @@ pub fn readdir(p: &CString) -> IoResult<~[Path]> {
508508

509509
let dir_ptr = p.with_ref(|buf| opendir(buf));
510510

511-
if dir_ptr as uint != 0 {
511+
if (dir_ptr as uint != 0) {
512512
let mut paths = ~[];
513513
debug!("os::list_dir -- opendir() SUCCESS");
514514
let mut entry_ptr = readdir(dir_ptr);
515-
while entry_ptr as uint != 0 {
515+
while (entry_ptr as uint != 0) {
516516
let cstr = CString::new(rust_list_dir_val(entry_ptr), false);
517517
paths.push(Path::new(cstr));
518518
entry_ptr = readdir(dir_ptr);

branches/try2/src/librustc/back/arm.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ use metadata::loader::meta_section_name;
1414
use syntax::abi;
1515

1616
pub fn get_target_strs(target_triple: ~str, target_os: abi::Os) -> target_strs::t {
17+
let cc_args = if target_triple.contains("thumb") {
18+
~[~"-mthumb"]
19+
} else {
20+
~[~"-marm"]
21+
};
1722
return target_strs::t {
1823
module_asm: ~"",
1924

@@ -63,6 +68,6 @@ pub fn get_target_strs(target_triple: ~str, target_os: abi::Os) -> target_strs::
6368

6469
target_triple: target_triple,
6570

66-
cc_args: ~[~"-marm"],
71+
cc_args: cc_args,
6772
};
6873
}

branches/try2/src/librustc/back/link.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ pub mod write {
126126
session::Default => lib::llvm::CodeGenLevelDefault,
127127
session::Aggressive => lib::llvm::CodeGenLevelAggressive,
128128
};
129-
let use_softfp = sess.opts.debugging_opts & session::USE_SOFTFP != 0;
129+
let use_softfp = sess.opts.debugging_opts & session::use_softfp != 0;
130130

131131
let tm = sess.targ_cfg.target_strs.target_triple.with_c_str(|T| {
132132
sess.opts.target_cpu.with_c_str(|CPU| {
@@ -156,6 +156,7 @@ pub mod write {
156156
pass.with_c_str(|s| llvm::LLVMRustAddPass(fpm, s))
157157
};
158158
if !sess.no_verify() { assert!(addpass("verify")); }
159+
if sess.lint_llvm() { assert!(addpass("lint")); }
159160

160161
if !sess.no_prepopulate_passes() {
161162
llvm::LLVMRustAddAnalysisPasses(tm, fpm, llmod);
@@ -987,7 +988,7 @@ fn link_natively(sess: Session, dylib: bool, obj_filename: &Path,
987988
let mut cc_args = sess.targ_cfg.target_strs.cc_args.clone();
988989
cc_args.push_all_move(link_args(sess, dylib, tmpdir.path(),
989990
obj_filename, out_filename));
990-
if (sess.opts.debugging_opts & session::PRINT_LINK_ARGS) != 0 {
991+
if (sess.opts.debugging_opts & session::print_link_args) != 0 {
991992
println!("{} link args: '{}'", cc_prog, cc_args.connect("' '"));
992993
}
993994

branches/try2/src/librustc/driver/driver.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,7 @@ static architecture_abis : &'static [(&'static str, abi::Architecture)] = &'stat
661661

662662
("arm", abi::Arm),
663663
("xscale", abi::Arm),
664+
("thumb", abi::Arm),
664665

665666
("mips", abi::Mips)];
666667

@@ -759,22 +760,22 @@ pub fn build_session_options(binary: ~str,
759760
}
760761
}
761762

762-
let mut debugging_opts = 0;
763+
let mut debugging_opts = 0u;
763764
let debug_flags = matches.opt_strs("Z");
764765
let debug_map = session::debugging_opts_map();
765766
for debug_flag in debug_flags.iter() {
766-
let mut this_bit = 0;
767+
let mut this_bit = 0u;
767768
for tuple in debug_map.iter() {
768769
let (name, bit) = match *tuple { (ref a, _, b) => (a, b) };
769770
if *name == *debug_flag { this_bit = bit; break; }
770771
}
771-
if this_bit == 0 {
772+
if this_bit == 0u {
772773
early_error(demitter, format!("unknown debug flag: {}", *debug_flag))
773774
}
774775
debugging_opts |= this_bit;
775776
}
776777

777-
if debugging_opts & session::DEBUG_LLVM != 0 {
778+
if debugging_opts & session::debug_llvm != 0 {
778779
unsafe { llvm::LLVMSetDebug(1); }
779780
}
780781

@@ -797,7 +798,7 @@ pub fn build_session_options(binary: ~str,
797798
let target_feature = matches.opt_str("target-feature").unwrap_or(~"");
798799
let save_temps = matches.opt_present("save-temps");
799800
let opt_level = {
800-
if (debugging_opts & session::NO_OPT) != 0 {
801+
if (debugging_opts & session::no_opt) != 0 {
801802
No
802803
} else if matches.opt_present("O") {
803804
if matches.opt_present("opt-level") {
@@ -816,9 +817,9 @@ pub fn build_session_options(binary: ~str,
816817
}
817818
} else { No }
818819
};
819-
let gc = debugging_opts & session::GC != 0;
820-
let extra_debuginfo = debugging_opts & session::EXTRA_DEBUG_INFO != 0;
821-
let debuginfo = debugging_opts & session::DEBUG_INFO != 0 ||
820+
let gc = debugging_opts & session::gc != 0;
821+
let extra_debuginfo = debugging_opts & session::extra_debug_info != 0;
822+
let debuginfo = debugging_opts & session::debug_info != 0 ||
822823
extra_debuginfo;
823824

824825
let addl_lib_search_paths = matches.opt_strs("L").map(|s| {

0 commit comments

Comments
 (0)