Skip to content

Commit e8788b8

Browse files
committed
---
yaml --- r: 105975 b: refs/heads/auto c: 770b6e2 h: refs/heads/master i: 105973: e29e3c1 105971: 3d20ca3 105967: 9fa06cb v: v3
1 parent ef9e44e commit e8788b8

File tree

16 files changed

+81
-60
lines changed

16 files changed

+81
-60
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: 76e0e26603d723038dae1ad06161cade47e53a55
16+
refs/heads/auto: 770b6e2fc2f8749466487e4c2ae031b8ceecae04
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/doc/guide-tasks.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,8 @@ fn pnorm(nums: &~[f64], p: uint) -> f64 {
351351
352352
fn main() {
353353
let numbers = vec::from_fn(1000000, |_| rand::random::<f64>());
354+
println!("Inf-norm = {}", *numbers.iter().max().unwrap());
355+
354356
let numbers_arc = Arc::new(numbers);
355357
356358
for num in range(1u, 10) {

branches/auto/src/libgreen/context.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,6 @@ fn initialize_call_frame(regs: &mut Registers, fptr: InitFn, arg: uint,
283283
unsafe { *sp = 0; }
284284

285285
regs[4] = arg as uint;
286-
regs[5] = procedure.code as uint;
287-
regs[6] = procedure.env as uint;
288286
regs[29] = sp as uint;
289287
regs[25] = fptr as uint;
290288
regs[31] = fptr as uint;

branches/auto/src/librustc/back/mips.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,39 +22,39 @@ pub fn get_target_strs(target_triple: ~str, target_os: abi::Os) -> target_strs::
2222

2323
data_layout: match target_os {
2424
abi::OsMacos => {
25-
~"E-p:32:32:32" +
25+
~"e-p:32:32:32" +
2626
"-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64" +
2727
"-f32:32:32-f64:64:64" +
2828
"-v64:64:64-v128:64:128" +
2929
"-a0:0:64-n32"
3030
}
3131

3232
abi::OsWin32 => {
33-
~"E-p:32:32:32" +
33+
~"e-p:32:32:32" +
3434
"-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64" +
3535
"-f32:32:32-f64:64:64" +
3636
"-v64:64:64-v128:64:128" +
3737
"-a0:0:64-n32"
3838
}
3939

4040
abi::OsLinux => {
41-
~"E-p:32:32:32" +
41+
~"e-p:32:32:32" +
4242
"-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64" +
4343
"-f32:32:32-f64:64:64" +
4444
"-v64:64:64-v128:64:128" +
4545
"-a0:0:64-n32"
4646
}
4747

4848
abi::OsAndroid => {
49-
~"E-p:32:32:32" +
49+
~"e-p:32:32:32" +
5050
"-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64" +
5151
"-f32:32:32-f64:64:64" +
5252
"-v64:64:64-v128:64:128" +
5353
"-a0:0:64-n32"
5454
}
5555

5656
abi::OsFreebsd => {
57-
~"E-p:32:32:32" +
57+
~"e-p:32:32:32" +
5858
"-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64" +
5959
"-f32:32:32-f64:64:64" +
6060
"-v64:64:64-v128:64:128" +

branches/auto/src/libstd/cmp.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,12 @@ pub trait Equiv<T> {
184184
}
185185

186186
#[inline]
187-
pub fn min<T: TotalOrd>(v1: T, v2: T) -> T {
187+
pub fn min<T:Ord>(v1: T, v2: T) -> T {
188188
if v1 < v2 { v1 } else { v2 }
189189
}
190190

191191
#[inline]
192-
pub fn max<T: TotalOrd>(v1: T, v2: T) -> T {
192+
pub fn max<T:Ord>(v1: T, v2: T) -> T {
193193
if v1 > v2 { v1 } else { v2 }
194194
}
195195

branches/auto/src/libstd/iter.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ use cmp;
6868
use num::{Zero, One, CheckedAdd, CheckedSub, Saturating, ToPrimitive, Int};
6969
use option::{Option, Some, None};
7070
use ops::{Add, Mul, Sub};
71-
use cmp::{Eq, Ord, TotalOrd};
71+
use cmp::{Eq, Ord};
7272
use clone::Clone;
7373
use uint;
7474
use mem;
@@ -626,7 +626,7 @@ pub trait Iterator<A> {
626626
/// assert_eq!(*xs.iter().max_by(|x| x.abs()).unwrap(), -10);
627627
/// ```
628628
#[inline]
629-
fn max_by<B: TotalOrd>(&mut self, f: |&A| -> B) -> Option<A> {
629+
fn max_by<B: Ord>(&mut self, f: |&A| -> B) -> Option<A> {
630630
self.fold(None, |max: Option<(A, B)>, x| {
631631
let x_val = f(&x);
632632
match max {
@@ -650,7 +650,7 @@ pub trait Iterator<A> {
650650
/// assert_eq!(*xs.iter().min_by(|x| x.abs()).unwrap(), 0);
651651
/// ```
652652
#[inline]
653-
fn min_by<B: TotalOrd>(&mut self, f: |&A| -> B) -> Option<A> {
653+
fn min_by<B: Ord>(&mut self, f: |&A| -> B) -> Option<A> {
654654
self.fold(None, |min: Option<(A, B)>, x| {
655655
let x_val = f(&x);
656656
match min {
@@ -917,7 +917,7 @@ pub trait OrdIterator<A> {
917917
fn min_max(&mut self) -> MinMaxResult<A>;
918918
}
919919

920-
impl<A: TotalOrd, T: Iterator<A>> OrdIterator<A> for T {
920+
impl<A: Ord, T: Iterator<A>> OrdIterator<A> for T {
921921
#[inline]
922922
fn max(&mut self) -> Option<A> {
923923
self.fold(None, |max, x| {

branches/auto/src/libstd/libc.rs

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2137,7 +2137,7 @@ pub mod consts {
21372137
pub static MAP_SHARED : c_int = 0x0001;
21382138
pub static MAP_PRIVATE : c_int = 0x0002;
21392139
pub static MAP_FIXED : c_int = 0x0010;
2140-
pub static MAP_ANON : c_int = 0x0800;
2140+
pub static MAP_ANON : c_int = 0x0020;
21412141

21422142
pub static MAP_FAILED : *c_void = -1 as *c_void;
21432143

@@ -2433,19 +2433,20 @@ pub mod consts {
24332433
pub static O_DSYNC : c_int = 16;
24342434
pub static O_SYNC : c_int = 16400;
24352435

2436-
pub static PROT_GROWSDOWN : c_int = 0x01000000;
2437-
pub static PROT_GROWSUP : c_int = 0x02000000;
2436+
pub static PROT_GROWSDOWN : c_int = 0x010000000;
2437+
pub static PROT_GROWSUP : c_int = 0x020000000;
24382438

24392439
pub static MAP_TYPE : c_int = 0x000f;
2440-
pub static MAP_ANONONYMOUS : c_int = 0x0800;
2441-
pub static MAP_GROWSDOWN : c_int = 0x01000;
2442-
pub static MAP_DENYWRITE : c_int = 0x02000;
2443-
pub static MAP_EXECUTABLE : c_int = 0x04000;
2444-
pub static MAP_LOCKED : c_int = 0x08000;
2445-
pub static MAP_NONRESERVE : c_int = 0x0400;
2446-
pub static MAP_POPULATE : c_int = 0x010000;
2447-
pub static MAP_NONBLOCK : c_int = 0x020000;
2448-
pub static MAP_STACK : c_int = 0x040000;
2440+
pub static MAP_ANONONYMOUS : c_int = 0x0020;
2441+
pub static MAP_32BIT : c_int = 0x0040;
2442+
pub static MAP_GROWSDOWN : c_int = 0x0100;
2443+
pub static MAP_DENYWRITE : c_int = 0x0800;
2444+
pub static MAP_EXECUTABLE : c_int = 0x01000;
2445+
pub static MAP_LOCKED : c_int = 0x02000;
2446+
pub static MAP_NONRESERVE : c_int = 0x04000;
2447+
pub static MAP_POPULATE : c_int = 0x08000;
2448+
pub static MAP_NONBLOCK : c_int = 0x010000;
2449+
pub static MAP_STACK : c_int = 0x020000;
24492450
}
24502451
#[cfg(target_os = "linux")]
24512452
pub mod sysconf {

branches/auto/src/libstd/option.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ impl<T> Option<T> {
104104
}
105105
}
106106

107-
/// Convert from `Option<T>` to `&mut [T]` (without copying)
107+
/// Convert from `Option<T>` to `&[T]` (without copying)
108108
#[inline]
109109
pub fn as_mut_slice<'r>(&'r mut self) -> &'r mut [T] {
110110
match *self {
@@ -211,13 +211,19 @@ impl<T> Option<T> {
211211
/// Return an iterator over the possibly contained value
212212
#[inline]
213213
pub fn iter<'r>(&'r self) -> Item<&'r T> {
214-
Item{opt: self.as_ref()}
214+
match *self {
215+
Some(ref x) => Item{opt: Some(x)},
216+
None => Item{opt: None}
217+
}
215218
}
216219

217220
/// Return a mutable iterator over the possibly contained value
218221
#[inline]
219222
pub fn mut_iter<'r>(&'r mut self) -> Item<&'r mut T> {
220-
Item{opt: self.as_mut()}
223+
match *self {
224+
Some(ref mut x) => Item{opt: Some(x)},
225+
None => Item{opt: None}
226+
}
221227
}
222228

223229
/// Return a consuming iterator over the possibly contained value

branches/auto/src/libstd/rt/libunwind.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,6 @@ pub static unwinder_private_data_size: int = 2;
6565
#[cfg(target_arch = "arm")]
6666
pub static unwinder_private_data_size: int = 20;
6767

68-
#[cfg(target_arch = "mips")]
69-
pub static unwinder_private_data_size: int = 2;
70-
7168
pub struct _Unwind_Exception {
7269
exception_class: _Unwind_Exception_Class,
7370
exception_cleanup: _Unwind_Exception_Cleanup_Fn,

branches/auto/src/libstd/sync/atomics.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,6 @@ impl AtomicInt {
225225
}
226226
}
227227

228-
// temporary workaround
229-
// it causes link failure on MIPS target
230-
// libgcc doesn't implement 64-bit atomic operations for MIPS32
231-
#[cfg(not(target_arch = "mips"))]
232228
impl AtomicU64 {
233229
pub fn new(v: u64) -> AtomicU64 {
234230
AtomicU64 { v:v, nopod: marker::NoPod }

branches/auto/src/libstd/unstable/mutex.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,16 +324,12 @@ mod imp {
324324
static __SIZEOF_PTHREAD_MUTEX_T: uint = 24 - 8;
325325
#[cfg(target_arch = "arm")]
326326
static __SIZEOF_PTHREAD_MUTEX_T: uint = 24 - 8;
327-
#[cfg(target_arch = "mips")]
328-
static __SIZEOF_PTHREAD_MUTEX_T: uint = 24 - 8;
329327
#[cfg(target_arch = "x86_64")]
330328
static __SIZEOF_PTHREAD_COND_T: uint = 48 - 8;
331329
#[cfg(target_arch = "x86")]
332330
static __SIZEOF_PTHREAD_COND_T: uint = 48 - 8;
333331
#[cfg(target_arch = "arm")]
334332
static __SIZEOF_PTHREAD_COND_T: uint = 48 - 8;
335-
#[cfg(target_arch = "mips")]
336-
static __SIZEOF_PTHREAD_COND_T: uint = 48 - 8;
337333

338334
pub struct pthread_mutex_t {
339335
__align: libc::c_longlong,

branches/auto/src/libsyntax/attr.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,9 @@ pub fn test_cfg<AM: AttrMetaMethods, It: Iterator<AM>>
317317
debug!("not!");
318318
// inside #[cfg(not(...))], so these need to all
319319
// not match.
320-
not_cfgs.iter().all(|mi| {
320+
!not_cfgs.iter().all(|mi| {
321321
debug!("cfg(not({}[...]))", mi.name());
322-
!contains(cfg, *mi)
322+
contains(cfg, *mi)
323323
})
324324
}
325325
_ => contains(cfg, *cfg_mi)

branches/auto/src/libtest/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1070,7 +1070,7 @@ impl MetricMap {
10701070
if delta.abs() <= noise {
10711071
LikelyNoise
10721072
} else {
1073-
let pct = delta.abs() / vold.value.max(f64::EPSILON) * 100.0;
1073+
let pct = delta.abs() / cmp::max(vold.value, f64::EPSILON) * 100.0;
10741074
if vold.noise < 0.0 {
10751075
// When 'noise' is negative, it means we want
10761076
// to see deltas that go up over time, and can

branches/auto/src/rt/arch/mips/morestack.S

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,38 @@ __morestack:
1919
.set noreorder
2020
.set nomacro
2121

22-
addiu $29, $29, -4
23-
sw $30, 0($29)
22+
// n.b. most of this is probably unnecessary. I know very little mips
23+
// assembly, and I didn't have anything to test on, so I wasn't
24+
// brave enough to try to trim this down.
2425

25-
// 16 = 4 (current) + 12 (previous)
26-
.cfi_def_cfa_offset 16
26+
addiu $29, $29, -12
27+
sw $31, 8($29)
28+
sw $30, 4($29)
29+
sw $23, 0($29)
30+
31+
// 24 = 12 (current) + 12 (previous)
32+
.cfi_def_cfa_offset 24
2733
.cfi_offset 31, -4
28-
.cfi_offset 30, -16
34+
.cfi_offset 30, -20
35+
.cfi_offset 23, -24
2936

37+
move $23, $28
3038
move $30, $29
3139
.cfi_def_cfa_register 30
3240

33-
// O32 ABI always reserves 16 bytes for arguments
34-
addiu $29, $29, -16
41+
// Save argument registers of the original function
42+
addiu $29, $29, -32
43+
sw $4, 16($29)
44+
sw $5, 20($29)
45+
sw $6, 24($29)
46+
sw $7, 28($29)
47+
48+
move $4, $14 // Size of stack arguments
49+
addu $5, $30, 24 // Address of stack arguments
50+
move $6, $15 // The amount of stack needed
3551

36-
lw $25, %call16(rust_stack_exhausted)($28)
52+
move $28, $23
53+
lw $25, %call16(rust_stack_exhausted)($23)
3754
jalr $25
3855
nop
3956

branches/auto/src/test/run-pass/cfgs-on-items.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,24 @@
1616
fn foo1() -> int { 1 }
1717

1818
// !fooA AND !bar
19-
#[cfg(not(fooA, bar))]
19+
#[cfg(not(fooA), not(bar))]
2020
fn foo2() -> int { 2 }
2121

2222
// fooC OR (fooB AND !bar)
2323
#[cfg(fooC)]
2424
#[cfg(fooB, not(bar))]
2525
fn foo2() -> int { 3 }
2626

27+
// fooA AND bar
28+
#[cfg(fooA, bar)]
29+
fn foo3() -> int { 2 }
30+
31+
// !(fooA AND bar)
32+
#[cfg(not(fooA, bar))]
33+
fn foo3() -> int { 3 }
2734

2835
pub fn main() {
2936
assert_eq!(1, foo1());
3037
assert_eq!(3, foo2());
38+
assert_eq!(3, foo3());
3139
}

branches/auto/src/test/run-pass/tcp-stress.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ fn main() {
2828
});
2929

3030
let addr = SocketAddr { ip: Ipv4Addr(127, 0, 0, 1), port: 0 };
31-
let (tx, rx) = channel();
31+
let (p, c) = Chan::new();
3232
spawn(proc() {
3333
let mut listener = TcpListener::bind(addr).unwrap();
34-
tx.send(listener.socket_name().unwrap());
34+
c.send(listener.socket_name().unwrap());
3535
let mut acceptor = listener.listen();
3636
loop {
3737
let mut stream = match acceptor.accept() {
@@ -45,11 +45,11 @@ fn main() {
4545
stream.write([2]);
4646
}
4747
});
48-
let addr = rx.recv();
48+
let addr = p.recv();
4949

50-
let (tx, rx) = channel();
50+
let (p, c) = Chan::new();
5151
for _ in range(0, 1000) {
52-
let tx = tx.clone();
52+
let c = c.clone();
5353
spawn(proc() {
5454
match TcpStream::connect(addr) {
5555
Ok(stream) => {
@@ -60,15 +60,15 @@ fn main() {
6060
},
6161
Err(e) => debug!("{:?}", e)
6262
}
63-
tx.send(());
63+
c.send(());
6464
});
6565
}
6666

6767
// Wait for all clients to exit, but don't wait for the server to exit. The
6868
// server just runs infinitely.
69-
drop(tx);
69+
drop(c);
7070
for _ in range(0, 1000) {
71-
rx.recv();
71+
p.recv();
7272
}
7373
unsafe { libc::exit(0) }
7474
}

0 commit comments

Comments
 (0)