Skip to content

Commit c186c12

Browse files
committed
---
yaml --- r: 34383 b: refs/heads/snap-stage3 c: 8ffc2b0 h: refs/heads/master i: 34381: b368b53 34379: a381d21 34375: df30ebd 34367: 745ca70 v: v3
1 parent 5603b0f commit c186c12

File tree

6 files changed

+25
-21
lines changed

6 files changed

+25
-21
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: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: af48f305421ae40bdcc8df7af168f8cfefc9bb86
4+
refs/heads/snap-stage3: 8ffc2b0f5e4b05472578797a569090ea04052593
55
refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/AUTHORS.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ Patrik Kårlin <[email protected]>
108108
Paul Stansifer <[email protected]>
109109
Paul Woolcock <[email protected]>
110110
Peter Hull <[email protected]>
111-
Peter Williams <[email protected]>
112111
Philipp Brüschweiler <[email protected]>
113112
Rafael Ávila de Espíndola <[email protected]>
114113
Ralph Giles <[email protected]>

branches/snap-stage3/src/etc/sugarise-doc-comments.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22

33
#
44
# this script attempts to turn doc comment attributes (#[doc = "..."])

branches/snap-stage3/src/libcore/ops.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
#[lang="drop"]
1717
pub trait Drop {
18-
fn finalize(&self); // FIXME(#4332): Rename to "drop"? --pcwalton
18+
fn finalize(&self); // XXX: Rename to "drop"? --pcwalton
1919
}
2020

2121
#[lang="add"]

branches/snap-stage3/src/libstd/sha1.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ use core::vec;
3737
/// The SHA-1 interface
3838
trait Sha1 {
3939
/// Provide message input as bytes
40-
fn input(&[const u8]);
40+
fn input((&[u8]));
4141
/// Provide message input as string
42-
fn input_str(&str);
42+
fn input_str((&str));
4343
/**
4444
* Read the digest as a vector of 20 bytes. After calling this no further
4545
* input may be provided until reset is called.
@@ -75,9 +75,9 @@ pub fn sha1() -> Sha1 {
7575
mut computed: bool,
7676
work_buf: @~[mut u32]};
7777

78-
fn add_input(st: &Sha1State, msg: &[const u8]) {
78+
fn add_input(st: &Sha1State, msg: &[u8]) {
7979
assert (!st.computed);
80-
for vec::each_const(msg) |element| {
80+
for vec::each(msg) |element| {
8181
st.msg_block[st.msg_block_idx] = *element;
8282
st.msg_block_idx += 1u;
8383
st.len_low += 8u32;
@@ -243,7 +243,7 @@ pub fn sha1() -> Sha1 {
243243
self.h[4] = 0xC3D2E1F0u32;
244244
self.computed = false;
245245
}
246-
fn input(msg: &[const u8]) { add_input(&self, msg); }
246+
fn input(msg: &[u8]) { add_input(&self, msg); }
247247
fn input_str(msg: &str) {
248248
let bs = str::to_bytes(msg);
249249
add_input(&self, bs);

branches/snap-stage3/src/test/bench/shootout-mandelbrot.rs

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ fn fillbyte(x: cmplx, incr: f64) -> u8 {
8383
rv
8484
}
8585

86-
fn chanmb(i: uint, size: uint) -> Line
86+
fn chanmb(i: uint, size: uint, ch: oldcomm::Chan<Line>) -> ()
8787
{
8888
let mut crv = ~[];
8989
let incr = 2f64/(size as f64);
@@ -93,24 +93,27 @@ fn chanmb(i: uint, size: uint) -> Line
9393
let x = cmplx {re: xincr*(j as f64) - 1.5f64, im: y};
9494
crv.push(fillbyte(x, incr));
9595
};
96-
Line {i:i, b:crv}
96+
oldcomm::send(ch, Line {i:i, b: move crv});
9797
}
9898

99-
struct Devnull();
99+
type devnull = {dn: int};
100100

101-
impl Devnull: io::Writer {
101+
impl devnull: io::Writer {
102102
fn write(&self, _b: &[const u8]) {}
103103
fn seek(&self, _i: int, _s: io::SeekStyle) {}
104104
fn tell(&self) -> uint {0_u}
105105
fn flush(&self) -> int {0}
106106
fn get_type(&self) -> io::WriterType { io::File }
107107
}
108108

109-
fn writer(path: ~str, pport: pipes::Port<Line>, size: uint)
109+
fn writer(path: ~str, writech: oldcomm::Chan<oldcomm::Chan<Line>>, size: uint)
110110
{
111+
let p: oldcomm::Port<Line> = oldcomm::Port();
112+
let ch = oldcomm::Chan(&p);
113+
oldcomm::send(writech, ch);
111114
let cout: io::Writer = match path {
112115
~"" => {
113-
Devnull as io::Writer
116+
{dn: 0} as io::Writer
114117
}
115118
~"-" => {
116119
io::stdout()
@@ -127,7 +130,7 @@ fn writer(path: ~str, pport: pipes::Port<Line>, size: uint)
127130
let mut done = 0_u;
128131
let mut i = 0_u;
129132
while i < size {
130-
let aline = pport.recv();
133+
let aline = oldcomm::recv(p);
131134
if aline.i == done {
132135
debug!("W %u", aline.i);
133136
cout.write(aline.b);
@@ -168,11 +171,13 @@ fn main() {
168171
let size = if vec::len(args) < 2_u { 80_u }
169172
else { uint::from_str(args[1]).get() };
170173

171-
let (pport, pchan) = pipes::stream();
172-
let pchan = pipes::SharedChan(pchan);
174+
let writep = oldcomm::Port();
175+
let writech = oldcomm::Chan(&writep);
176+
do task::spawn |move path| {
177+
writer(copy path, writech, size);
178+
};
179+
let ch = oldcomm::recv(writep);
173180
for uint::range(0_u, size) |j| {
174-
let cchan = pchan.clone();
175-
do task::spawn |move cchan| { cchan.send(chanmb(j, size)) };
181+
do task::spawn { chanmb(j, size, ch) };
176182
};
177-
writer(path, pport, size);
178183
}

0 commit comments

Comments
 (0)