Skip to content

Commit 72203f3

Browse files
committed
---
yaml --- r: 94007 b: refs/heads/try c: 8b964bf h: refs/heads/master i: 94005: 6d932ee 94003: be77ff1 93999: 56fbd5b v: v3
1 parent 3594e0f commit 72203f3

File tree

8 files changed

+21
-136
lines changed

8 files changed

+21
-136
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 0da105a8b7b6b1e0568e8ff20f6ff4b13cc7ecc2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d3e57dca68fde4effdda3e4ae2887aa535fcd6
5-
refs/heads/try: 6616dbf075477a1b66e3760751f27885961017d4
5+
refs/heads/try: 8b964bf34901b01bdd461f7830ed46fc1ff4e223
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ CFG_PREFIX=${CFG_PREFIX%/}
607607
CFG_MANDIR=${CFG_MANDIR%/}
608608
CFG_HOST="$(echo $CFG_HOST | tr ',' ' ')"
609609
CFG_TARGET="$(echo $CFG_TARGET | tr ',' ' ')"
610-
CFG_SUPPORTED_TARGET="$(grep ^CC_*=* ${CFG_SRC_DIR}mk/platform.mk | sed -e 's/^CC_//' -e 's/\([^=]*\).*/\1/' | xargs)"
610+
CFG_SUPPORTED_TARGET="$(grep ^CC_*=* $CFG_SRC_DIR/mk/platform.mk | sed -e 's/^CC_//' -e 's/\([^=]*\).*/\1/' | xargs)"
611611

612612
# copy host-triples to target-triples so that hosts are a subset of targets
613613
V_TEMP=""

branches/try/mk/install.mk

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,11 @@ install-target-$(1)-host-$(2): LIB_DESTIN_DIR=$$(PTL$(1)$(2))
8989
install-target-$(1)-host-$(2): $$(TSREQ$$(ISTAGE)_T_$(1)_H_$(2)) $$(SREQ$$(ISTAGE)_T_$(1)_H_$(2))
9090
$$(Q)$$(call MK_INSTALL_DIR,$$(PTL$(1)$(2)))
9191
$$(Q)$$(call INSTALL_LIB,$$(STDLIB_GLOB_$(1)))
92+
$$(Q)$$(call INSTALL_LIB,$$(STDLIB_RGLOB_$(1)))
9293
$$(Q)$$(call INSTALL_LIB,$$(EXTRALIB_GLOB_$(1)))
94+
$$(Q)$$(call INSTALL_LIB,$$(EXTRALIB_RGLOB_$(1)))
9395
$$(Q)$$(call INSTALL_LIB,$$(LIBRUSTUV_GLOB_$(1)))
96+
$$(Q)$$(call INSTALL_LIB,$$(LIBRUSTUV_RGLOB_$(1)))
9497
$$(Q)$$(call INSTALL_LIB,libmorestack.a)
9598

9699
endef
@@ -102,8 +105,11 @@ install-target-$(1)-host-$(2): $$(CSREQ$$(ISTAGE)_T_$(1)_H_$(2))
102105
$$(Q)$$(call MK_INSTALL_DIR,$$(PTL$(1)$(2)))
103106
$$(Q)$$(call INSTALL_LIB,$$(CFG_RUSTLLVM_$(1)))
104107
$$(Q)$$(call INSTALL_LIB,$$(STDLIB_GLOB_$(1)))
108+
$$(Q)$$(call INSTALL_LIB,$$(STDLIB_RGLOB_$(1)))
105109
$$(Q)$$(call INSTALL_LIB,$$(EXTRALIB_GLOB_$(1)))
110+
$$(Q)$$(call INSTALL_LIB,$$(EXTRALIB_RGLOB_$(1)))
106111
$$(Q)$$(call INSTALL_LIB,$$(LIBRUSTUV_GLOB_$(1)))
112+
$$(Q)$$(call INSTALL_LIB,$$(LIBRUSTUV_RGLOB_$(1)))
107113
$$(Q)$$(call INSTALL_LIB,$$(LIBRUSTC_GLOB_$(1)))
108114
$$(Q)$$(call INSTALL_LIB,$$(LIBSYNTAX_GLOB_$(1)))
109115
$$(Q)$$(call INSTALL_LIB,$$(LIBRUSTPKG_GLOB_$(1)))

branches/try/mk/llvm.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ LLVM_DEPS := $(S)/.gitmodules
1414
else
1515

1616
# This is just a rough approximation of LLVM deps
17-
LLVM_DEPS_SRC=$(call rwildcard,$(CFG_LLVM_SRC_DIR)lib,*cpp *hpp)
18-
LLVM_DEPS_INC=$(call rwildcard,$(CFG_LLVM_SRC_DIR)include,*cpp *hpp)
17+
LLVM_DEPS_SRC=$(call rwildcard,$(CFG_LLVM_SRC_DIR)/lib,*cpp *hpp)
18+
LLVM_DEPS_INC=$(call rwildcard,$(CFG_LLVM_SRC_DIR)/include,*cpp *hpp)
1919
LLVM_DEPS=$(LLVM_DEPS_SRC) $(LLVM_DEPS_INC)
2020
endif
2121

branches/try/mk/tests.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ ifdef CFG_UNIXY_$(1)
9898
endif
9999

100100
ifdef CFG_WINDOWSY_$(1)
101-
CFG_TESTLIB_$(1)=$$(CFG_BUILD_DIR)$$(2)/$$(strip \
101+
CFG_TESTLIB_$(1)=$$(CFG_BUILD_DIR)/$$(2)/$$(strip \
102102
$$(if $$(findstring stage0,$$(1)), \
103103
stage0/$$(CFG_LIBDIR), \
104104
$$(if $$(findstring stage1,$$(1)), \

branches/try/src/libstd/io/buffered.rs

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -166,19 +166,12 @@ impl<W: Writer> BufferedWriter<W> {
166166
pub fn new(inner: W) -> BufferedWriter<W> {
167167
BufferedWriter::with_capacity(DEFAULT_CAPACITY, inner)
168168
}
169-
170-
fn flush_buf(&mut self) {
171-
if self.pos != 0 {
172-
self.inner.write(self.buf.slice_to(self.pos));
173-
self.pos = 0;
174-
}
175-
}
176169
}
177170

178171
impl<W: Writer> Writer for BufferedWriter<W> {
179172
fn write(&mut self, buf: &[u8]) {
180173
if self.pos + buf.len() > self.buf.len() {
181-
self.flush_buf();
174+
self.flush();
182175
}
183176

184177
if buf.len() > self.buf.len() {
@@ -191,13 +184,16 @@ impl<W: Writer> Writer for BufferedWriter<W> {
191184
}
192185

193186
fn flush(&mut self) {
194-
self.flush_buf();
187+
if self.pos != 0 {
188+
self.inner.write(self.buf.slice_to(self.pos));
189+
self.pos = 0;
190+
}
195191
self.inner.flush();
196192
}
197193
}
198194

199195
impl<W: Writer> Decorator<W> for BufferedWriter<W> {
200-
fn inner(mut self) -> W { self.flush_buf(); self.inner }
196+
fn inner(self) -> W { self.inner }
201197
fn inner_ref<'a>(&'a self) -> &'a W { &self.inner }
202198
fn inner_mut_ref<'a>(&'a mut self) -> &'a mut W { &mut self.inner }
203199
}
@@ -222,7 +218,7 @@ impl<W: Writer> LineBufferedWriter<W> {
222218

223219
impl<W: Writer> Writer for LineBufferedWriter<W> {
224220
fn write(&mut self, buf: &[u8]) {
225-
match buf.iter().rposition(|&b| b == '\n' as u8) {
221+
match buf.iter().position(|&b| b == '\n' as u8) {
226222
Some(i) => {
227223
self.inner.write(buf.slice_to(i + 1));
228224
self.inner.flush();
@@ -391,15 +387,6 @@ mod test {
391387
writer.inner_ref().inner_ref().as_slice());
392388
}
393389

394-
#[test]
395-
fn test_buffered_writer_inner_flushes() {
396-
let mut w = BufferedWriter::with_capacity(3, MemWriter::new());
397-
w.write([0, 1]);
398-
assert_eq!([], w.inner_ref().inner_ref().as_slice());
399-
let w = w.inner();
400-
assert_eq!([0, 1], w.inner_ref().as_slice());
401-
}
402-
403390
// This is just here to make sure that we don't infinite loop in the
404391
// newtype struct autoderef weirdness
405392
#[test]
@@ -443,15 +430,10 @@ mod test {
443430
assert_eq!(*writer.inner_ref().inner_ref(), ~[]);
444431
writer.flush();
445432
assert_eq!(*writer.inner_ref().inner_ref(), ~[0, 1]);
446-
writer.write([0, '\n' as u8, 1, '\n' as u8, 2]);
447-
assert_eq!(*writer.inner_ref().inner_ref(),
448-
~[0, 1, 0, '\n' as u8, 1, '\n' as u8]);
433+
writer.write([0, '\n' as u8, 1]);
434+
assert_eq!(*writer.inner_ref().inner_ref(), ~[0, 1, 0, '\n' as u8]);
449435
writer.flush();
450-
assert_eq!(*writer.inner_ref().inner_ref(),
451-
~[0, 1, 0, '\n' as u8, 1, '\n' as u8, 2]);
452-
writer.write([3, '\n' as u8]);
453-
assert_eq!(*writer.inner_ref().inner_ref(),
454-
~[0, 1, 0, '\n' as u8, 1, '\n' as u8, 2, 3, '\n' as u8]);
436+
assert_eq!(*writer.inner_ref().inner_ref(), ~[0, 1, 0, '\n' as u8, 1]);
455437
}
456438

457439
#[bench]

branches/try/src/libstd/rt/deque.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,6 @@ mod tests {
590590
}
591591

592592
#[test]
593-
#[ignore(cfg(windows))] // apparently windows scheduling is weird?
594593
fn no_starvation() {
595594
static AMT: int = 10000;
596595
static NTHREADS: int = 4;

branches/try/src/libstd/vec.rs

Lines changed: 0 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1933,18 +1933,6 @@ pub trait MutableVector<'self, T> {
19331933
/// Returns a reversed iterator that allows modifying each value
19341934
fn mut_rev_iter(self) -> MutRevIterator<'self, T>;
19351935

1936-
/**
1937-
* Returns an iterator over `size` elements of the vector at a time.
1938-
* The chunks are mutable and do not overlap. If `size` does not divide the
1939-
* length of the vector, then the last chunk will not have length
1940-
* `size`.
1941-
*
1942-
* # Failure
1943-
*
1944-
* Fails if `size` is 0.
1945-
*/
1946-
fn mut_chunks(self, chunk_size: uint) -> MutChunkIter<'self, T>;
1947-
19481936
/**
19491937
* Returns a mutable reference to the first element in this slice
19501938
* and adjusts the slice in place so that it no longer contains
@@ -2081,13 +2069,6 @@ impl<'self,T> MutableVector<'self, T> for &'self mut [T] {
20812069
self.mut_iter().invert()
20822070
}
20832071

2084-
#[inline]
2085-
fn mut_chunks(self, chunk_size: uint) -> MutChunkIter<'self, T> {
2086-
assert!(chunk_size > 0);
2087-
let len = self.len();
2088-
MutChunkIter { v: self, chunk_size: chunk_size, remaining: len }
2089-
}
2090-
20912072
fn mut_shift_ref(&mut self) -> &'self mut T {
20922073
unsafe {
20932074
let s: &mut Slice<T> = cast::transmute(self);
@@ -2575,59 +2556,6 @@ impl<'self, T> Clone for VecIterator<'self, T> {
25752556
iterator!{struct VecMutIterator -> *mut T, &'self mut T}
25762557
pub type MutRevIterator<'self, T> = Invert<VecMutIterator<'self, T>>;
25772558

2578-
/// An iterator over a vector in (non-overlapping) mutable chunks (`size` elements at a time). When
2579-
/// the vector len is not evenly divided by the chunk size, the last slice of the iteration will be
2580-
/// the remainder.
2581-
pub struct MutChunkIter<'self, T> {
2582-
priv v: &'self mut [T],
2583-
priv chunk_size: uint,
2584-
priv remaining: uint
2585-
}
2586-
2587-
impl<'self, T> Iterator<&'self mut [T]> for MutChunkIter<'self, T> {
2588-
#[inline]
2589-
fn next(&mut self) -> Option<&'self mut [T]> {
2590-
if self.remaining == 0 {
2591-
None
2592-
} else {
2593-
let sz = cmp::min(self.remaining, self.chunk_size);
2594-
let tmp = util::replace(&mut self.v, &mut []);
2595-
let (head, tail) = tmp.mut_split(sz);
2596-
self.v = tail;
2597-
self.remaining -= sz;
2598-
Some(head)
2599-
}
2600-
}
2601-
2602-
#[inline]
2603-
fn size_hint(&self) -> (uint, Option<uint>) {
2604-
if self.remaining == 0 {
2605-
(0, Some(0))
2606-
} else {
2607-
let (n, rem) = self.remaining.div_rem(&self.chunk_size);
2608-
let n = if rem > 0 { n + 1 } else { n };
2609-
(n, Some(n))
2610-
}
2611-
}
2612-
}
2613-
2614-
impl<'self, T> DoubleEndedIterator<&'self mut [T]> for MutChunkIter<'self, T> {
2615-
#[inline]
2616-
fn next_back(&mut self) -> Option<&'self mut [T]> {
2617-
if self.remaining == 0 {
2618-
None
2619-
} else {
2620-
let remainder = self.remaining % self.chunk_size;
2621-
let sz = if remainder != 0 { remainder } else { self.chunk_size };
2622-
let tmp = util::replace(&mut self.v, &mut []);
2623-
let (head, tail) = tmp.mut_split(self.remaining - sz);
2624-
self.v = head;
2625-
self.remaining -= sz;
2626-
Some(tail)
2627-
}
2628-
}
2629-
}
2630-
26312559
/// An iterator that moves out of a vector.
26322560
#[deriving(Clone)]
26332561
pub struct MoveIterator<T> {
@@ -4038,36 +3966,6 @@ mod tests {
40383966
x.pop_ref();
40393967
}
40403968

4041-
#[test]
4042-
fn test_mut_chunks() {
4043-
let mut v = [0u8, 1, 2, 3, 4, 5, 6];
4044-
for (i, chunk) in v.mut_chunks(3).enumerate() {
4045-
for x in chunk.mut_iter() {
4046-
*x = i as u8;
4047-
}
4048-
}
4049-
let result = [0u8, 0, 0, 1, 1, 1, 2];
4050-
assert_eq!(v, result);
4051-
}
4052-
4053-
#[test]
4054-
fn test_mut_chunks_invert() {
4055-
let mut v = [0u8, 1, 2, 3, 4, 5, 6];
4056-
for (i, chunk) in v.mut_chunks(3).invert().enumerate() {
4057-
for x in chunk.mut_iter() {
4058-
*x = i as u8;
4059-
}
4060-
}
4061-
let result = [2u8, 2, 2, 1, 1, 1, 0];
4062-
assert_eq!(v, result);
4063-
}
4064-
4065-
#[test]
4066-
#[should_fail]
4067-
fn test_mut_chunks_0() {
4068-
let mut v = [1, 2, 3, 4];
4069-
let _it = v.mut_chunks(0);
4070-
}
40713969

40723970
#[test]
40733971
fn test_mut_shift_ref() {

0 commit comments

Comments
 (0)