Skip to content

Commit 6fbfc38

Browse files
committed
---
yaml --- r: 77804 b: refs/heads/master c: b9601c4 h: refs/heads/master v: v3
1 parent 6eaf538 commit 6fbfc38

40 files changed

+1191
-1168
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: 3c5a43e5b6f857c71c6f66dbbd640a47d34a0e7e
2+
refs/heads/master: b9601c48a525dcdc569052e65c3c6b93833f3011
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/brson/libuv.git
7+
url = https://github.com/alexcrichton/libuv.git
88
branch = master

trunk/mk/rt.mk

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -168,36 +168,49 @@ 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+
171181
# XXX: Shouldn't need platform-specific conditions here
172182
ifdef CFG_WINDOWSY_$(1)
173183
$$(LIBUV_LIB_$(1)_$(2)): $$(LIBUV_DEPS)
174-
$$(Q)$$(MAKE) -C $$(S)src/libuv/ \
175-
builddir_name="$$(CFG_BUILD_DIR)/rt/$(1)/stage$(2)/libuv" \
176-
OS=mingw \
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))" \
177188
V=$$(VERBOSE)
189+
$$(Q)cp $$(S)src/libuv/libuv.a $$@
178190
else ifeq ($(OSTYPE_$(1)), linux-androideabi)
179-
$$(LIBUV_LIB_$(1)_$(2)): $$(LIBUV_DEPS)
180-
$$(Q)$$(MAKE) -C $$(S)src/libuv/ \
191+
$$(LIBUV_LIB_$(1)_$(2)): $$(LIBUV_DEPS) $$(LIBUV_MAKEFILE_$(1)_$(2))
192+
$$(Q)$$(MAKE) -C $$(@D) \
181193
CFLAGS="$$(CFG_GCCISH_CFLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1))) $$(SNAP_DEFINES)" \
182194
LDFLAGS="$$(CFG_GCCISH_LINK_FLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1)))" \
183195
CC="$$(CC_$(1))" \
184196
CXX="$$(CXX_$(1))" \
185-
LINK="$$(CXX_$(1))" \
186197
AR="$$(AR_$(1))" \
187-
PLATFORM=android \
188-
BUILDTYPE=Release \
189-
builddir_name="$$(CFG_BUILD_DIR)/rt/$(1)/stage$(2)/libuv" \
190198
host=android OS=linux \
199+
builddir="." \
200+
BUILDTYPE=Release \
201+
NO_LOAD="$$(LIBUV_NO_LOAD)" \
191202
V=$$(VERBOSE)
192203
else
193-
$$(LIBUV_LIB_$(1)_$(2)): $$(LIBUV_DEPS)
194-
$$(Q)$$(MAKE) -C $$(S)src/libuv/ \
204+
$$(LIBUV_LIB_$(1)_$(2)): $$(LIBUV_DEPS) $$(LIBUV_MAKEFILE_$(1)_$(2))
205+
$$(Q)$$(MAKE) -C $$(@D) \
195206
CFLAGS="$$(CFG_GCCISH_CFLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1))) $$(SNAP_DEFINES)" \
196207
LDFLAGS="$$(CFG_GCCISH_LINK_FLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1)))" \
197208
CC="$$(CC_$(1))" \
198209
CXX="$$(CXX_$(1))" \
199210
AR="$$(AR_$(1))" \
200-
builddir_name="$$(CFG_BUILD_DIR)/rt/$(1)/stage$(2)/libuv" \
211+
builddir="." \
212+
BUILDTYPE=Release \
213+
NO_LOAD="$$(LIBUV_NO_LOAD)" \
201214
V=$$(VERBOSE)
202215
endif
203216

@@ -261,3 +274,7 @@ endef
261274
$(foreach stage,$(STAGES), \
262275
$(foreach target,$(CFG_TARGET_TRIPLES), \
263276
$(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-
});
57+
}).unwrap();
5858

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

trunk/src/compiletest/runtest.rs

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

23-
use std::cell::Cell;
2423
use std::io;
2524
use std::os;
2625
use std::str;
27-
use std::task::{spawn_sched, SingleThreaded};
2826
use std::vec;
29-
use std::unstable::running_on_valgrind;
3027

3128
use extra::test::MetricMap;
3229

3330
pub fn run(config: config, testfile: ~str) {
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-
}
31+
let mut _mm = MetricMap::new();
32+
run_metrics(config, testfile, &mut _mm);
5833
}
5934

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

trunk/src/libextra/json.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2013 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,9 +1164,6 @@ 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)) }
11701167
}
11711168

11721169
/// A trait for converting values to JSON

trunk/src/libextra/semver.rs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2013 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,18 +37,6 @@ 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-
}
5240
}
5341

5442
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-
109107
debug!("pandoc cmd: %s", pandoc_cmd);
110108
debug!("pandoc args: %s", pandoc_args.connect(" "));
111109

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

114-
proc.input().write_str(markdown);
114+
proc.input().write(markdown.as_bytes());
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()});
92+
,..ProcessOptions::new()}).unwrap();
9393
prog.finish_with_output()
9494
}
9595

trunk/src/librustpkg/tests.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,14 @@ 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 mut prog = run::Process::new("git", args, run::ProcessOptions {
115+
let 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();
122123
let rslt = prog.finish_with_output();
123124
if rslt.status != 0 {
124125
fail!("%s [git returned %?, output = %s, error = %s]", err_msg,
@@ -226,7 +227,7 @@ fn command_line_test_with_env(args: &[~str], cwd: &Path, env: Option<~[(~str, ~s
226227
in_fd: None,
227228
out_fd: None,
228229
err_fd: None
229-
});
230+
}).unwrap();
230231
let output = prog.finish_with_output();
231232
debug!("Output from command %s with args %? was %s {%s}[%?]",
232233
cmd, args, str::from_bytes(output.output),
@@ -1027,16 +1028,17 @@ fn test_extern_mod() {
10271028
test_sysroot().to_str(),
10281029
exec_file.to_str());
10291030
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 {
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 {
10341035
env: env,
10351036
dir: Some(&dir),
10361037
in_fd: None,
10371038
out_fd: None,
10381039
err_fd: None
10391040
});
1041+
let mut prog = prog.unwrap();
10401042
let outp = prog.finish_with_output();
10411043
if outp.status != 0 {
10421044
fail!("output was %s, error was %s",

trunk/src/libstd/iter.rs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
/*! Times trait
12+
13+
~~~ {.rust}
14+
use iter::Times;
15+
let ten = 10 as uint;
16+
let mut accum = 0;
17+
do ten.times { accum += 1; }
18+
~~~
19+
20+
*/
21+
22+
#[allow(missing_doc)]
23+
pub trait Times {
24+
fn times(&self, it: &fn());
25+
}
26+

trunk/src/libstd/num/num.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -80,19 +80,6 @@ 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-
9683
pub trait Integer: Num
9784
+ Orderable
9885
+ 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 num;
13+
use iter;
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 num::Times for uint {
73+
impl iter::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 num::Times;
165+
use iter::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 num::Times;
52+
pub use iter::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 num::Times;
721+
use iter::Times;
722722
use rt::util;
723723

724724
#[test]

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

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

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

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,9 @@ 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+
271274
/// Synchronous, non-blocking network I/O.
272275
pub mod net {
273276
pub mod tcp;

0 commit comments

Comments
 (0)