Skip to content

Commit c8d67dd

Browse files
committed
---
yaml --- r: 129490 b: refs/heads/snap-stage3 c: a284240 h: refs/heads/master v: v3
1 parent 74cb765 commit c8d67dd

File tree

9 files changed

+84
-26
lines changed

9 files changed

+84
-26
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 566b470e138e929e8a93d613372db1ba177c494f
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: f6dfff29acb8ea70315c61251fe0c3318907a783
4+
refs/heads/snap-stage3: a2842407839f0a98283394d03c794d9bd5372c89
55
refs/heads/try: 80b45ddbd351f0a4a939c3a3c4e20b4defec4b35
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ then
635635
LLVM_VERSION=$($LLVM_CONFIG --version)
636636

637637
case $LLVM_VERSION in
638-
(3.[2-5]*)
638+
(3.[2-6]*)
639639
msg "found ok version of LLVM: $LLVM_VERSION"
640640
;;
641641
(*)

branches/snap-stage3/src/libarena/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ mod tests {
563563

564564
struct Noncopy {
565565
string: String,
566-
array: Vec<int> ,
566+
array: Vec<int>,
567567
}
568568

569569
#[test]

branches/snap-stage3/src/libcollections/bitv.rs

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2566,7 +2566,9 @@ mod tests {
25662566
let mut r = rng();
25672567
let mut bitv = 0 as uint;
25682568
b.iter(|| {
2569-
bitv |= 1 << ((r.next_u32() as uint) % uint::BITS);
2569+
for _ in range(0u, 100) {
2570+
bitv |= 1 << ((r.next_u32() as uint) % uint::BITS);
2571+
}
25702572
&bitv
25712573
})
25722574
}
@@ -2576,7 +2578,9 @@ mod tests {
25762578
let mut r = rng();
25772579
let mut bitv = Bitv::with_capacity(BENCH_BITS, false);
25782580
b.iter(|| {
2579-
bitv.set((r.next_u32() as uint) % BENCH_BITS, true);
2581+
for _ in range(0u, 100) {
2582+
bitv.set((r.next_u32() as uint) % BENCH_BITS, true);
2583+
}
25802584
&bitv
25812585
})
25822586
}
@@ -2586,7 +2590,9 @@ mod tests {
25862590
let mut r = rng();
25872591
let mut bitv = Bitv::with_capacity(uint::BITS, false);
25882592
b.iter(|| {
2589-
bitv.set((r.next_u32() as uint) % uint::BITS, true);
2593+
for _ in range(0u, 100) {
2594+
bitv.set((r.next_u32() as uint) % uint::BITS, true);
2595+
}
25902596
&bitv
25912597
})
25922598
}
@@ -2596,7 +2602,9 @@ mod tests {
25962602
let mut r = rng();
25972603
let mut bitv = BitvSet::new();
25982604
b.iter(|| {
2599-
bitv.insert((r.next_u32() as uint) % uint::BITS);
2605+
for _ in range(0u, 100) {
2606+
bitv.insert((r.next_u32() as uint) % uint::BITS);
2607+
}
26002608
&bitv
26012609
})
26022610
}
@@ -2606,7 +2614,9 @@ mod tests {
26062614
let mut r = rng();
26072615
let mut bitv = BitvSet::new();
26082616
b.iter(|| {
2609-
bitv.insert((r.next_u32() as uint) % BENCH_BITS);
2617+
for _ in range(0u, 100) {
2618+
bitv.insert((r.next_u32() as uint) % BENCH_BITS);
2619+
}
26102620
&bitv
26112621
})
26122622
}
@@ -2616,29 +2626,33 @@ mod tests {
26162626
let mut b1 = Bitv::with_capacity(BENCH_BITS, false);
26172627
let b2 = Bitv::with_capacity(BENCH_BITS, false);
26182628
b.iter(|| {
2619-
b1.union(&b2);
2629+
b1.union(&b2)
26202630
})
26212631
}
26222632

26232633
#[bench]
2624-
fn bench_btv_small_iter(b: &mut Bencher) {
2634+
fn bench_bitv_small_iter(b: &mut Bencher) {
26252635
let bitv = Bitv::with_capacity(uint::BITS, false);
26262636
b.iter(|| {
2627-
let mut _sum = 0;
2628-
for pres in bitv.iter() {
2629-
_sum += pres as uint;
2637+
let mut sum = 0;
2638+
for _ in range(0u, 10) {
2639+
for pres in bitv.iter() {
2640+
sum += pres as uint;
2641+
}
26302642
}
2643+
sum
26312644
})
26322645
}
26332646

26342647
#[bench]
26352648
fn bench_bitv_big_iter(b: &mut Bencher) {
26362649
let bitv = Bitv::with_capacity(BENCH_BITS, false);
26372650
b.iter(|| {
2638-
let mut _sum = 0;
2651+
let mut sum = 0;
26392652
for pres in bitv.iter() {
2640-
_sum += pres as uint;
2653+
sum += pres as uint;
26412654
}
2655+
sum
26422656
})
26432657
}
26442658

@@ -2647,10 +2661,11 @@ mod tests {
26472661
let bitv = BitvSet::from_bitv(from_fn(BENCH_BITS,
26482662
|idx| {idx % 3 == 0}));
26492663
b.iter(|| {
2650-
let mut _sum = 0;
2664+
let mut sum = 0;
26512665
for idx in bitv.iter() {
2652-
_sum += idx;
2666+
sum += idx;
26532667
}
2668+
sum
26542669
})
26552670
}
26562671
}

branches/snap-stage3/src/libcollections/priority_queue.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -529,10 +529,9 @@ impl<'a, T> Iterator<&'a T> for Items<'a, T> {
529529
}
530530

531531
impl<T: Ord> FromIterator<T> for PriorityQueue<T> {
532-
fn from_iter<Iter: Iterator<T>>(iter: Iter) -> PriorityQueue<T> {
533-
let mut q = PriorityQueue::new();
534-
q.extend(iter);
535-
q
532+
fn from_iter<Iter: Iterator<T>>(mut iter: Iter) -> PriorityQueue<T> {
533+
let vec: Vec<T> = iter.collect();
534+
PriorityQueue::from_vec(vec)
536535
}
537536
}
538537

branches/snap-stage3/src/librustrt/unwind.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,11 @@ pub mod eabi {
402402
use libunwind as uw;
403403
use libc::{c_void, c_int};
404404

405+
#[repr(C)]
405406
struct EXCEPTION_RECORD;
407+
#[repr(C)]
406408
struct CONTEXT;
409+
#[repr(C)]
407410
struct DISPATCHER_CONTEXT;
408411

409412
#[repr(C)]

branches/snap-stage3/src/libsyntax/parse/mod.rs

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -412,14 +412,21 @@ pub fn str_lit(lit: &str) -> String {
412412
loop {
413413
match chars.next() {
414414
Some((i, c)) => {
415-
let em = error(i);
416415
match c {
417416
'\\' => {
418-
if chars.peek().expect(em.as_slice()).val1() == '\n' {
417+
let ch = chars.peek().unwrap_or_else(|| {
418+
fail!("{}", error(i).as_slice())
419+
}).val1();
420+
421+
if ch == '\n' {
419422
eat(&mut chars);
420-
} else if chars.peek().expect(em.as_slice()).val1() == '\r' {
423+
} else if ch == '\r' {
421424
chars.next();
422-
if chars.peek().expect(em.as_slice()).val1() != '\n' {
425+
let ch = chars.peek().unwrap_or_else(|| {
426+
fail!("{}", error(i).as_slice())
427+
}).val1();
428+
429+
if ch != '\n' {
423430
fail!("lexer accepted bare CR");
424431
}
425432
eat(&mut chars);
@@ -433,7 +440,11 @@ pub fn str_lit(lit: &str) -> String {
433440
}
434441
},
435442
'\r' => {
436-
if chars.peek().expect(em.as_slice()).val1() != '\n' {
443+
let ch = chars.peek().unwrap_or_else(|| {
444+
fail!("{}", error(i).as_slice())
445+
}).val1();
446+
447+
if ch != '\n' {
437448
fail!("lexer accepted bare CR");
438449
}
439450
chars.next();

branches/snap-stage3/src/test/run-pass/slowparse-bstring.rs

Lines changed: 15 additions & 0 deletions
Large diffs are not rendered by default.

branches/snap-stage3/src/test/run-pass/slowparse-string.rs

Lines changed: 15 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)