Skip to content

Commit 3934a03

Browse files
committed
---
yaml --- r: 48874 b: refs/heads/snap-stage3 c: 8f44488 h: refs/heads/master v: v3
1 parent 25bea6f commit 3934a03

Some content is hidden

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

42 files changed

+231
-271
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: 3bbcac322669cff3abde5be937cc4ec3860f3985
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 1fa2b9980fabff3227d5e5915d1180a0f6922d37
4+
refs/heads/snap-stage3: 8f4448837b09fe644524ba28d59dee08950ef6b5
55
refs/heads/try: 2a8fb58d79e685d5ca07b039badcf2ae3ef077ea
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/doc/rust.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,7 @@ An example of `use` declarations:
806806

807807
~~~~
808808
use core::float::sin;
809-
use core::str::{slice, to_upper};
809+
use core::str::{slice_DBG_BRWD, to_upper};
810810
use core::option::Some;
811811
812812
fn main() {
@@ -817,8 +817,8 @@ fn main() {
817817
info!(Some(1.0));
818818
819819
// Equivalent to
820-
// 'info!(core::str::to_upper(core::str::slice("foo", 0, 1)));'
821-
info!(to_upper(slice("foo", 0, 1)));
820+
// 'info!(core::str::to_upper(core::str::slice_DBG_BRWD("foo", 0, 1)));'
821+
info!(to_upper(slice_DBG_BRWD("foo", 0, 1)));
822822
}
823823
~~~~
824824

@@ -2668,7 +2668,7 @@ Within the body of an item that has type parameter declarations, the names of it
26682668
fn map<A: Copy, B: Copy>(f: &fn(A) -> B, xs: &[A]) -> ~[B] {
26692669
if xs.len() == 0 { return ~[]; }
26702670
let first: B = f(xs[0]);
2671-
let rest: ~[B] = map(f, xs.slice(1, xs.len()));
2671+
let rest: ~[B] = map(f, xs.slice_V_DBG_BRWD(1, xs.len()));
26722672
return ~[first] + rest;
26732673
}
26742674
~~~~~~~

branches/snap-stage3/src/compiletest/errors.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ fn parse_expected(line_num: uint, line: ~str) -> ~[ExpectedError] {
5151
while idx < len && line[idx] == (' ' as u8) { idx += 1u; }
5252
let start_kind = idx;
5353
while idx < len && line[idx] != (' ' as u8) { idx += 1u; }
54-
let kind = str::to_lower(str::slice(line, start_kind, idx));
54+
let kind = str::to_lower(str::slice_DBG_BRWD(line, start_kind, idx).to_owned());
5555

5656
// Extract msg:
5757
while idx < len && line[idx] == (' ' as u8) { idx += 1u; }
58-
let msg = str::slice(line, idx, len);
58+
let msg = str::slice_DBG_BRWD(line, idx, len).to_owned();
5959

6060
debug!("line=%u kind=%s msg=%s", line_num - adjust_line, kind, msg);
6161

branches/snap-stage3/src/compiletest/header.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ fn parse_name_value_directive(line: ~str,
174174
let keycolon = directive + ~":";
175175
match str::find_str(line, keycolon) {
176176
Some(colon) => {
177-
let value = str::slice(line, colon + str::len(keycolon),
178-
str::len(line));
177+
let value = str::slice_DBG_BRWD(line, colon + str::len(keycolon),
178+
str::len(line)).to_owned();
179179
debug!("%s: %s", directive, value);
180180
Some(value)
181181
}

branches/snap-stage3/src/etc/x86.supp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -451,21 +451,6 @@
451451
fun:*uv_loop_delete*
452452
}
453453

454-
{
455-
race-or-something-ask-pcwalton-0
456-
Memcheck:Value4
457-
fun:*task_start_wrapper*
458-
...
459-
}
460-
461-
{
462-
race-or-something-ask-pcwalton-1
463-
Memcheck:Value4
464-
...
465-
fun:*build_start_wrapper*
466-
...
467-
}
468-
469454
{
470455
lock_and_signal-probably-threadsafe-access-outside-of-lock
471456
Helgrind:Race

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ pub fn stream<T:Owned>() -> (Port<T>, Chan<T>) {
110110
// required.
111111
#[cfg(stage1)]
112112
#[cfg(stage2)]
113-
#[cfg(stage3)]
114113
pub impl<T: Owned> Chan<T> {
115114
fn send(&self, x: T) { chan_send(self, x) }
116115
fn try_send(&self, x: T) -> bool { chan_try_send(self, x) }
@@ -150,7 +149,6 @@ fn chan_try_send<T:Owned>(self: &Chan<T>, x: T) -> bool {
150149
// Use an inherent impl so that imports are not required:
151150
#[cfg(stage1)]
152151
#[cfg(stage2)]
153-
#[cfg(stage3)]
154152
pub impl<T: Owned> Port<T> {
155153
fn recv(&self) -> T { port_recv(self) }
156154
fn try_recv(&self) -> Option<T> { port_try_recv(self) }
@@ -228,7 +226,6 @@ pub fn PortSet<T: Owned>() -> PortSet<T>{
228226
// Use an inherent impl so that imports are not required:
229227
#[cfg(stage1)]
230228
#[cfg(stage2)]
231-
#[cfg(stage3)]
232229
pub impl<T:Owned> PortSet<T> {
233230
fn recv(&self) -> T { port_set_recv(self) }
234231
fn try_recv(&self) -> Option<T> { port_set_try_recv(self) }
@@ -304,7 +301,6 @@ pub type SharedChan<T> = unstable::Exclusive<Chan<T>>;
304301
305302
#[cfg(stage1)]
306303
#[cfg(stage2)]
307-
#[cfg(stage3)]
308304
pub impl<T: Owned> SharedChan<T> {
309305
fn send(&self, x: T) { shared_chan_send(self, x) }
310306
fn try_send(&self, x: T) -> bool { shared_chan_try_send(self, x) }

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ use libc;
2121
use libc::{c_int, c_long, c_uint, c_void, size_t, ssize_t};
2222
use libc::consts::os::posix88::*;
2323
use os;
24-
use cast;
25-
use path::Path;
26-
use ops::Drop;
24+
use prelude::*;
2725
use ptr;
2826
use result;
2927
use str;
@@ -77,7 +75,6 @@ pub trait Reader {
7775

7876
#[cfg(stage1)]
7977
#[cfg(stage2)]
80-
#[cfg(stage3)]
8178
impl Reader for @Reader {
8279
fn read(&self, bytes: &mut [u8], len: uint) -> uint {
8380
self.read(bytes, len)
@@ -660,7 +657,6 @@ pub trait Writer {
660657
661658
#[cfg(stage1)]
662659
#[cfg(stage2)]
663-
#[cfg(stage3)]
664660
impl Writer for @Writer {
665661
fn write(&self, v: &[const u8]) { self.write(v) }
666662
fn seek(&self, a: int, b: SeekStyle) { self.seek(a, b) }

branches/snap-stage3/src/libcore/num/strconv.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -364,14 +364,14 @@ pub pure fn to_str_bytes_common<T:NumCast+Zero+One+Eq+Ord+NumStrConv+Copy+
364364

365365
// only resize buf if we actually remove digits
366366
if i < buf_max_i {
367-
buf = buf.slice(0, i + 1);
367+
buf = buf.slice_V_DBG_BRWD(0, i + 1).to_owned();
368368
}
369369
}
370370
} // If exact and trailing '.', just cut that
371371
else {
372372
let max_i = buf.len() - 1;
373373
if buf[max_i] == '.' as u8 {
374-
buf = buf.slice(0, max_i);
374+
buf = buf.slice_V_DBG_BRWD(0, max_i).to_owned();
375375
}
376376
}
377377

@@ -606,7 +606,7 @@ pub pure fn from_str_bytes_common<T:NumCast+Zero+One+Ord+Copy+Div<T,T>+
606606
// parse remaining bytes as decimal integer,
607607
// skipping the exponent char
608608
let exp: Option<int> = from_str_bytes_common(
609-
buf.view(i+1, len), 10, true, false, false, ExpNone, false);
609+
buf.slice_V_DBG_BRWD(i+1, len), 10, true, false, false, ExpNone, false);
610610

611611
match exp {
612612
Some(exp_pow) => {

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ impl GenericPath for PosixPath {
410410
None => None,
411411
Some(ref f) => {
412412
match str::rfind_char(*f, '.') {
413-
Some(p) => Some(f.slice(0, p)),
413+
Some(p) => Some(f.slice_DBG_BRWD(0, p).to_owned()),
414414
None => Some(copy *f)
415415
}
416416
}
@@ -422,7 +422,7 @@ impl GenericPath for PosixPath {
422422
None => None,
423423
Some(ref f) => {
424424
match str::rfind_char(*f, '.') {
425-
Some(p) if p < f.len() => Some(f.slice(p, f.len())),
425+
Some(p) if p < f.len() => Some(f.slice_DBG_BRWD(p, f.len()).to_owned()),
426426
_ => None
427427
}
428428
}
@@ -622,7 +622,7 @@ impl GenericPath for WindowsPath {
622622
None => None,
623623
Some(ref f) => {
624624
match str::rfind_char(*f, '.') {
625-
Some(p) => Some(f.slice(0, p)),
625+
Some(p) => Some(f.slice_DBG_BRWD(0, p).to_owned()),
626626
None => Some(copy *f)
627627
}
628628
}
@@ -634,7 +634,7 @@ impl GenericPath for WindowsPath {
634634
None => None,
635635
Some(ref f) => {
636636
match str::rfind_char(*f, '.') {
637-
Some(p) if p < f.len() => Some(f.slice(p, f.len())),
637+
Some(p) if p < f.len() => Some(f.slice_DBG_BRWD(p, f.len()).to_owned()),
638638
_ => None
639639
}
640640
}
@@ -842,8 +842,8 @@ pub mod windows {
842842
let mut i = 2;
843843
while i < s.len() {
844844
if is_sep(s[i]) {
845-
let pre = s.slice(2, i);
846-
let mut rest = s.slice(i, s.len());
845+
let pre = s.slice_DBG_BRWD(2, i).to_owned();
846+
let mut rest = s.slice_DBG_BRWD(i, s.len()).to_owned();
847847
return Some((pre, rest));
848848
}
849849
i += 1;
@@ -860,9 +860,9 @@ pub mod windows {
860860
let rest = if s.len() == 2 {
861861
~""
862862
} else {
863-
s.slice(2, s.len())
863+
s.slice_DBG_BRWD(2, s.len()).to_owned()
864864
};
865-
return Some((s.slice(0,1), rest));
865+
return Some((s.slice_DBG_BRWD(0,1).to_owned(), rest));
866866
}
867867
None
868868
}

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ pub use tuple::{CopyableTuple, ImmutableTuple, ExtendedTupleOps};
4343
pub use vec::{CopyableVector, ImmutableVector};
4444
pub use vec::{ImmutableEqVector, ImmutableCopyableVector};
4545
pub use vec::{OwnedVector, OwnedCopyableVector};
46-
pub use io::{Reader, ReaderUtil, Writer, WriterUtil};
4746

4847
/* Reexported runtime types */
4948
pub use comm::{stream, Port, Chan, GenericChan, GenericSmartChan, GenericPort, Peekable};

branches/snap-stage3/src/libcore/rt/uv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ fn listen() {
878878
if status.is_none() {
879879
rtdebug!("got %d bytes", nread);
880880
let buf = buf.unwrap();
881-
for buf.view(0, nread as uint).each |byte| {
881+
for buf.slice_V_DBG_BRWD(0, nread as uint).each |byte| {
882882
fail_unless!(*byte == count as u8);
883883
rtdebug!("%u", *byte as uint);
884884
count += 1;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ fn read_all(rd: io::Reader) -> ~str {
303303
let mut bytes = [0, ..4096];
304304
while !rd.eof() {
305305
let nread = rd.read(bytes, bytes.len());
306-
wr.write(bytes.view(0, nread));
306+
wr.write(bytes.slice_V_DBG_BRWD(0, nread));
307307
}
308308
});
309309
str::from_bytes(buf)
@@ -404,7 +404,7 @@ pub fn readclose(fd: c_int) -> ~str {
404404
let mut bytes = [0, ..4096];
405405
while !reader.eof() {
406406
let nread = reader.read(bytes, bytes.len());
407-
writer.write(bytes.view(0, nread));
407+
writer.write(bytes.slice_V_DBG_BRWD(0, nread));
408408
}
409409
});
410410
os::fclose(file);

0 commit comments

Comments
 (0)