Skip to content

Commit 9e0a964

Browse files
committed
---
yaml --- r: 101890 b: refs/heads/master c: 109673f h: refs/heads/master v: v3
1 parent 6351d54 commit 9e0a964

File tree

8 files changed

+11
-58
lines changed

8 files changed

+11
-58
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: b36340b6269e1b54fb4aa3ff49a90262fb2d953c
2+
refs/heads/master: 109673f3688dd975ad2d177f094f1722de10b195
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 6e7f170fedd3c526a643c0b2d13863acd982be02
55
refs/heads/try: a97642026c18a624ff6ea01075dd9550f8ed07ff

trunk/mk/tests.mk

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -174,16 +174,6 @@ endif
174174
check: cleantestlibs cleantmptestlogs tidy all check-stage2
175175
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
176176

177-
check-notidy: cleantestlibs cleantmptestlogs all check-stage2
178-
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
179-
180-
check-full: cleantestlibs cleantmptestlogs tidy \
181-
all check-stage1 check-stage2 check-stage3
182-
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
183-
184-
check-test: cleantestlibs cleantmptestlogs all check-stage2-rfail
185-
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
186-
187177
check-lite: cleantestlibs cleantmptestlogs \
188178
$(foreach crate,$(TARGET_CRATES),check-stage2-$(crate)) \
189179
check-stage2-rpass \

trunk/src/libstd/comm/shared.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
/// module. You'll also note that the implementation of the shared and stream
1919
/// channels are quite similar, and this is no coincidence!
2020
21-
use cmp;
2221
use int;
2322
use iter::Iterator;
2423
use kinds::Send;
@@ -36,9 +35,6 @@ use mpsc = sync::mpsc_queue;
3635

3736
static DISCONNECTED: int = int::MIN;
3837
static FUDGE: int = 1024;
39-
#[cfg(test)]
40-
static MAX_STEALS: int = 5;
41-
#[cfg(not(test))]
4238
static MAX_STEALS: int = 1 << 20;
4339

4440
pub struct Packet<T> {
@@ -311,11 +307,7 @@ impl<T: Send> Packet<T> {
311307
DISCONNECTED => {
312308
self.cnt.store(DISCONNECTED, atomics::SeqCst);
313309
}
314-
n => {
315-
let m = cmp::min(n, self.steals);
316-
self.steals -= m;
317-
self.cnt.fetch_add(n - m, atomics::SeqCst);
318-
}
310+
n => { self.steals -= n; }
319311
}
320312
assert!(self.steals >= 0);
321313
}

trunk/src/libstd/comm/stream.rs

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
/// High level implementation details can be found in the comment of the parent
1818
/// module.
1919
20-
use cmp;
2120
use comm::Port;
2221
use int;
2322
use iter::Iterator;
@@ -33,9 +32,6 @@ use sync::atomics;
3332
use vec::OwnedVector;
3433

3534
static DISCONNECTED: int = int::MIN;
36-
#[cfg(test)]
37-
static MAX_STEALS: int = 5;
38-
#[cfg(not(test))]
3935
static MAX_STEALS: int = 1 << 20;
4036

4137
pub struct Packet<T> {
@@ -202,28 +198,19 @@ impl<T: Send> Packet<T> {
202198
pub fn try_recv(&mut self) -> Result<T, Failure<T>> {
203199
match self.queue.pop() {
204200
// If we stole some data, record to that effect (this will be
205-
// factored into cnt later on).
206-
//
207-
// Note that we don't allow steals to grow without bound in order to
208-
// prevent eventual overflow of either steals or cnt as an overflow
209-
// would have catastrophic results. Sometimes, steals > cnt, but
210-
// other times cnt > steals, so we don't know the relation between
211-
// steals and cnt. This code path is executed only rarely, so we do
212-
// a pretty slow operation, of swapping 0 into cnt, taking steals
213-
// down as much as possible (without going negative), and then
214-
// adding back in whatever we couldn't factor into steals.
201+
// factored into cnt later on). Note that we don't allow steals to
202+
// grow without bound in order to prevent eventual overflow of
203+
// either steals or cnt as an overflow would have catastrophic
204+
// results. Also note that we don't unconditionally set steals to 0
205+
// because it can be true that steals > cnt.
215206
Some(data) => {
216207
self.steals += 1;
217208
if self.steals > MAX_STEALS {
218209
match self.cnt.swap(0, atomics::SeqCst) {
219210
DISCONNECTED => {
220211
self.cnt.store(DISCONNECTED, atomics::SeqCst);
221212
}
222-
n => {
223-
let m = cmp::min(n, self.steals);
224-
self.steals -= m;
225-
self.cnt.fetch_add(n - m, atomics::SeqCst);
226-
}
213+
n => { self.steals -= n; }
227214
}
228215
assert!(self.steals >= 0);
229216
}

trunk/src/libstd/num/f32.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -867,6 +867,7 @@ impl num::FromStrRadix for f32 {
867867
#[cfg(test)]
868868
mod tests {
869869
use f32::*;
870+
use prelude::*;
870871

871872
use num::*;
872873
use num;

trunk/src/libstd/num/f64.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -869,6 +869,7 @@ impl num::FromStrRadix for f64 {
869869
#[cfg(test)]
870870
mod tests {
871871
use f64::*;
872+
use prelude::*;
872873

873874
use num::*;
874875
use num;

trunk/src/libstd/task.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ use rt::task::Task;
6565
use str::{Str, SendStr, IntoMaybeOwned};
6666

6767
#[cfg(test)] use any::{AnyOwnExt, AnyRefExt};
68+
#[cfg(test)] use ptr;
6869
#[cfg(test)] use result;
6970

7071
/// Indicates the manner in which a task exited.

trunk/src/test/compile-fail/borrowck-move-from-subpath-of-borrowed-path.rs

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)