Skip to content

Commit 92f8093

Browse files
committed
---
yaml --- r: 77805 b: refs/heads/master c: 5ef8cdb h: refs/heads/master i: 77803: 6eaf538 v: v3
1 parent 6fbfc38 commit 92f8093

40 files changed

+1168
-1191
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: b9601c48a525dcdc569052e65c3c6b93833f3011
2+
refs/heads/master: 5ef8cdb8fd1f34fd3ab51ceba7ec286cedc349d8
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 60fba4d7d677ec098e6a43014132fe99f7547363
55
refs/heads/try: ebfe63cd1c0b5d23f7ea60c69b4fde2e30cfd42a

trunk/.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
branch = master
55
[submodule "src/libuv"]
66
path = src/libuv
7-
url = https://github.com/alexcrichton/libuv.git
7+
url = https://github.com/brson/libuv.git
88
branch = master

trunk/mk/rt.mk

Lines changed: 12 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -168,49 +168,36 @@ LIBUV_DEPS := $$(wildcard \
168168
$$(S)src/libuv/*/*/*/*)
169169
endif
170170

171-
LIBUV_GYP := $$(S)src/libuv/build/gyp
172-
LIBUV_MAKEFILE_$(1)_$(2) := $$(CFG_BUILD_DIR)rt/$(1)/stage$(2)/libuv/Makefile
173-
LIBUV_NO_LOAD = run-benchmarks.target.mk run-tests.target.mk \
174-
uv_dtrace_header.target.mk uv_dtrace_provider.target.mk
175-
176-
$$(LIBUV_MAKEFILE_$(1)_$(2)): $$(LIBUV_GYP)
177-
(cd $(S)src/libuv/ && \
178-
$$(CFG_PYTHON) ./gyp_uv -f make -Dtarget_arch=$$(LIBUV_ARCH_$(1)) -D ninja \
179-
-Goutput_dir=$$(@D) --generator-output $$(@D))
180-
181171
# XXX: Shouldn't need platform-specific conditions here
182172
ifdef CFG_WINDOWSY_$(1)
183173
$$(LIBUV_LIB_$(1)_$(2)): $$(LIBUV_DEPS)
184-
$$(Q)rm -f $$(S)src/libuv/libuv.a
185-
$$(Q)$$(MAKE) -C $$(S)src/libuv -f Makefile.mingw \
186-
CFLAGS="$$(CFG_GCCISH_CFLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1))) $$(SNAP_DEFINES)" \
187-
AR="$$(AR_$(1))" \
174+
$$(Q)$$(MAKE) -C $$(S)src/libuv/ \
175+
builddir_name="$$(CFG_BUILD_DIR)/rt/$(1)/stage$(2)/libuv" \
176+
OS=mingw \
188177
V=$$(VERBOSE)
189-
$$(Q)cp $$(S)src/libuv/libuv.a $$@
190178
else ifeq ($(OSTYPE_$(1)), linux-androideabi)
191-
$$(LIBUV_LIB_$(1)_$(2)): $$(LIBUV_DEPS) $$(LIBUV_MAKEFILE_$(1)_$(2))
192-
$$(Q)$$(MAKE) -C $$(@D) \
179+
$$(LIBUV_LIB_$(1)_$(2)): $$(LIBUV_DEPS)
180+
$$(Q)$$(MAKE) -C $$(S)src/libuv/ \
193181
CFLAGS="$$(CFG_GCCISH_CFLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1))) $$(SNAP_DEFINES)" \
194182
LDFLAGS="$$(CFG_GCCISH_LINK_FLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1)))" \
195183
CC="$$(CC_$(1))" \
196184
CXX="$$(CXX_$(1))" \
185+
LINK="$$(CXX_$(1))" \
197186
AR="$$(AR_$(1))" \
198-
host=android OS=linux \
199-
builddir="." \
187+
PLATFORM=android \
200188
BUILDTYPE=Release \
201-
NO_LOAD="$$(LIBUV_NO_LOAD)" \
189+
builddir_name="$$(CFG_BUILD_DIR)/rt/$(1)/stage$(2)/libuv" \
190+
host=android OS=linux \
202191
V=$$(VERBOSE)
203192
else
204-
$$(LIBUV_LIB_$(1)_$(2)): $$(LIBUV_DEPS) $$(LIBUV_MAKEFILE_$(1)_$(2))
205-
$$(Q)$$(MAKE) -C $$(@D) \
193+
$$(LIBUV_LIB_$(1)_$(2)): $$(LIBUV_DEPS)
194+
$$(Q)$$(MAKE) -C $$(S)src/libuv/ \
206195
CFLAGS="$$(CFG_GCCISH_CFLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1))) $$(SNAP_DEFINES)" \
207196
LDFLAGS="$$(CFG_GCCISH_LINK_FLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1)))" \
208197
CC="$$(CC_$(1))" \
209198
CXX="$$(CXX_$(1))" \
210199
AR="$$(AR_$(1))" \
211-
builddir="." \
212-
BUILDTYPE=Release \
213-
NO_LOAD="$$(LIBUV_NO_LOAD)" \
200+
builddir_name="$$(CFG_BUILD_DIR)/rt/$(1)/stage$(2)/libuv" \
214201
V=$$(VERBOSE)
215202
endif
216203

@@ -274,7 +261,3 @@ endef
274261
$(foreach stage,$(STAGES), \
275262
$(foreach target,$(CFG_TARGET_TRIPLES), \
276263
$(eval $(call DEF_RUNTIME_TARGETS,$(target),$(stage)))))
277-
278-
$(LIBUV_GYP):
279-
mkdir -p $(S)src/libuv/build
280-
git clone https://git.chromium.org/external/gyp.git $(S)src/libuv/build/gyp

trunk/src/compiletest/procsrv.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ pub fn run(lib_path: &str,
5454
in_fd: None,
5555
out_fd: None,
5656
err_fd: None
57-
}).unwrap();
57+
});
5858

5959
for input in input.iter() {
60-
proc.input().write(input.as_bytes());
60+
proc.input().write_str(*input);
6161
}
6262
let output = proc.finish_with_output();
6363

trunk/src/compiletest/runtest.rs

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,41 @@ use procsrv;
2020
use util;
2121
use util::logv;
2222

23+
use std::cell::Cell;
2324
use std::io;
2425
use std::os;
2526
use std::str;
27+
use std::task::{spawn_sched, SingleThreaded};
2628
use std::vec;
29+
use std::unstable::running_on_valgrind;
2730

2831
use extra::test::MetricMap;
2932

3033
pub fn run(config: config, testfile: ~str) {
31-
let mut _mm = MetricMap::new();
32-
run_metrics(config, testfile, &mut _mm);
34+
let config = Cell::new(config);
35+
let testfile = Cell::new(testfile);
36+
// FIXME #6436: Creating another thread to run the test because this
37+
// is going to call waitpid. The new scheduler has some strange
38+
// interaction between the blocking tasks and 'friend' schedulers
39+
// that destroys parallelism if we let normal schedulers block.
40+
// It should be possible to remove this spawn once std::run is
41+
// rewritten to be non-blocking.
42+
//
43+
// We do _not_ create another thread if we're running on V because
44+
// it serializes all threads anyways.
45+
if running_on_valgrind() {
46+
let config = config.take();
47+
let testfile = testfile.take();
48+
let mut _mm = MetricMap::new();
49+
run_metrics(config, testfile, &mut _mm);
50+
} else {
51+
do spawn_sched(SingleThreaded) {
52+
let config = config.take();
53+
let testfile = testfile.take();
54+
let mut _mm = MetricMap::new();
55+
run_metrics(config, testfile, &mut _mm);
56+
}
57+
}
3358
}
3459

3560
pub fn run_metrics(config: config, testfile: ~str, mm: &mut MetricMap) {

trunk/src/libextra/json.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -1164,6 +1164,9 @@ impl Ord for Json {
11641164
}
11651165
}
11661166
}
1167+
fn le(&self, other: &Json) -> bool { !(*other).lt(&(*self)) }
1168+
fn ge(&self, other: &Json) -> bool { !(*self).lt(other) }
1169+
fn gt(&self, other: &Json) -> bool { (*other).lt(&(*self)) }
11671170
}
11681171

11691172
/// A trait for converting values to JSON

trunk/src/libextra/semver.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -37,6 +37,18 @@ impl cmp::Ord for Identifier {
3737
(&AlphaNumeric(_), _) => false
3838
}
3939
}
40+
#[inline]
41+
fn le(&self, other: &Identifier) -> bool {
42+
! (other < self)
43+
}
44+
#[inline]
45+
fn gt(&self, other: &Identifier) -> bool {
46+
other < self
47+
}
48+
#[inline]
49+
fn ge(&self, other: &Identifier) -> bool {
50+
! (self < other)
51+
}
4052
}
4153

4254
impl ToStr for Identifier {

trunk/src/librustdoc/markdown_writer.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,14 @@ fn pandoc_writer(
104104
];
105105
106106
do generic_writer |markdown| {
107+
use std::io::WriterUtil;
108+
107109
debug!("pandoc cmd: %s", pandoc_cmd);
108110
debug!("pandoc args: %s", pandoc_args.connect(" "));
109111

110-
let proc = run::Process::new(pandoc_cmd, pandoc_args,
111-
run::ProcessOptions::new());
112-
let mut proc = proc.unwrap();
112+
let mut proc = run::Process::new(pandoc_cmd, pandoc_args, run::ProcessOptions::new());
113113

114-
proc.input().write(markdown.as_bytes());
114+
proc.input().write_str(markdown);
115115
let output = proc.finish_with_output();
116116

117117
debug!("pandoc result: %i", output.status);

trunk/src/librustpkg/source_control.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ pub fn git_clone_general(source: &str, target: &Path, v: &Version) -> bool {
8989

9090
fn process_output_in_cwd(prog: &str, args: &[~str], cwd: &Path) -> ProcessOutput {
9191
let mut prog = Process::new(prog, args, ProcessOptions{ dir: Some(cwd)
92-
,..ProcessOptions::new()}).unwrap();
92+
,..ProcessOptions::new()});
9393
prog.finish_with_output()
9494
}
9595

trunk/src/librustpkg/tests.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,13 @@ fn mk_temp_workspace(short_name: &Path, version: &Version) -> Path {
112112

113113
fn run_git(args: &[~str], env: Option<~[(~str, ~str)]>, cwd: &Path, err_msg: &str) {
114114
let cwd = (*cwd).clone();
115-
let prog = run::Process::new("git", args, run::ProcessOptions {
115+
let mut prog = run::Process::new("git", args, run::ProcessOptions {
116116
env: env,
117117
dir: Some(&cwd),
118118
in_fd: None,
119119
out_fd: None,
120120
err_fd: None
121121
});
122-
let mut prog = prog.unwrap();
123122
let rslt = prog.finish_with_output();
124123
if rslt.status != 0 {
125124
fail!("%s [git returned %?, output = %s, error = %s]", err_msg,
@@ -227,7 +226,7 @@ fn command_line_test_with_env(args: &[~str], cwd: &Path, env: Option<~[(~str, ~s
227226
in_fd: None,
228227
out_fd: None,
229228
err_fd: None
230-
}).unwrap();
229+
});
231230
let output = prog.finish_with_output();
232231
debug!("Output from command %s with args %? was %s {%s}[%?]",
233232
cmd, args, str::from_bytes(output.output),
@@ -1028,17 +1027,16 @@ fn test_extern_mod() {
10281027
test_sysroot().to_str(),
10291028
exec_file.to_str());
10301029
1031-
let prog = run::Process::new(rustc.to_str(), [main_file.to_str(),
1032-
~"--sysroot", test_sysroot().to_str(),
1033-
~"-o", exec_file.to_str()],
1034-
run::ProcessOptions {
1030+
let mut prog = run::Process::new(rustc.to_str(), [main_file.to_str(),
1031+
~"--sysroot", test_sysroot().to_str(),
1032+
~"-o", exec_file.to_str()],
1033+
run::ProcessOptions {
10351034
env: env,
10361035
dir: Some(&dir),
10371036
in_fd: None,
10381037
out_fd: None,
10391038
err_fd: None
10401039
});
1041-
let mut prog = prog.unwrap();
10421040
let outp = prog.finish_with_output();
10431041
if outp.status != 0 {
10441042
fail!("output was %s, error was %s",

trunk/src/libstd/iter.rs

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

trunk/src/libstd/num/num.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,19 @@ pub trait Signed: Num
8080

8181
pub trait Unsigned: Num {}
8282

83+
/// Times trait
84+
///
85+
/// ~~~ {.rust}
86+
/// use num::Times;
87+
/// let ten = 10 as uint;
88+
/// let mut accum = 0;
89+
/// do ten.times { accum += 1; }
90+
/// ~~~
91+
///
92+
pub trait Times {
93+
fn times(&self, it: &fn());
94+
}
95+
8396
pub trait Integer: Num
8497
+ Orderable
8598
+ Div<Self,Self>

trunk/src/libstd/num/uint.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
//! Operations and constants for `uint`
1212
13-
use iter;
13+
use num;
1414
use sys;
1515

1616
pub use self::generated::*;
@@ -70,7 +70,7 @@ pub fn div_round(x: uint, y: uint) -> uint {
7070
///
7171
pub fn div_floor(x: uint, y: uint) -> uint { return x / y; }
7272

73-
impl iter::Times for uint {
73+
impl num::Times for uint {
7474
#[inline]
7575
///
7676
/// A convenience form for basic repetition. Given a uint `x`,
@@ -162,7 +162,7 @@ fn test_div() {
162162

163163
#[test]
164164
pub fn test_times() {
165-
use iter::Times;
165+
use num::Times;
166166
let ten = 10 as uint;
167167
let mut accum = 0;
168168
do ten.times { accum += 1; }

trunk/src/libstd/prelude.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pub use cmp::{Eq, ApproxEq, Ord, TotalEq, TotalOrd, Ordering, Less, Equal, Great
4949
pub use char::Char;
5050
pub use container::{Container, Mutable, Map, MutableMap, Set, MutableSet};
5151
pub use hash::Hash;
52-
pub use iter::Times;
52+
pub use num::Times;
5353
pub use iterator::{FromIterator, Extendable};
5454
pub use iterator::{Iterator, DoubleEndedIterator, RandomAccessIterator, ClonableIterator};
5555
pub use iterator::{OrdIterator, MutableDoubleEndedIterator};

trunk/src/libstd/rt/comm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ mod test {
718718
use option::*;
719719
use rt::test::*;
720720
use cell::Cell;
721-
use iter::Times;
721+
use num::Times;
722722
use rt::util;
723723

724724
#[test]

trunk/src/libstd/rt/io/file.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ pub struct FileStream {
7171
last_nread: int,
7272
}
7373

74+
impl FileStream {
75+
}
76+
7477
impl Reader for FileStream {
7578
fn read(&mut self, buf: &mut [u8]) -> Option<uint> {
7679
match self.fd.read(buf) {

trunk/src/libstd/rt/io/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,6 @@ pub use self::extensions::WriterByteConversions;
268268
/// Synchronous, non-blocking file I/O.
269269
pub mod file;
270270

271-
/// Synchronous, in-memory I/O.
272-
pub mod pipe;
273-
274271
/// Synchronous, non-blocking network I/O.
275272
pub mod net {
276273
pub mod tcp;

0 commit comments

Comments
 (0)