Skip to content

Commit f04b911

Browse files
committed
---
yaml --- r: 144058 b: refs/heads/try2 c: 758c5e8 h: refs/heads/master v: v3
1 parent 872b9ec commit f04b911

File tree

533 files changed

+5474
-2003
lines changed

Some content is hidden

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

533 files changed

+5474
-2003
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 1fcb7ed9a67f316344b0b39e7682dceb1a61cf3e
8+
refs/heads/try2: 758c5e823621d1a6ef57f7a3a3cd5ba19116a777
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/doc/tutorial-container.md

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,10 @@ iterator object. For example, vector slices several iterators available:
112112
113113
* `iter()` and `rev_iter()`, for immutable references to the elements
114114
* `mut_iter()` and `mut_rev_iter()`, for mutable references to the elements
115-
* `consume_iter()` and `consume_rev_iter`, to move the elements out by-value
115+
* `move_iter()` and `move_rev_iter`, to move the elements out by-value
116116
117117
A typical mutable container will implement at least `iter()`, `mut_iter()` and
118-
`consume_iter()` along with the reverse variants if it maintains an order.
118+
`move_iter()` along with the reverse variants if it maintains an order.
119119
120120
### Freezing
121121
@@ -139,9 +139,9 @@ and `&mut`.
139139
140140
## Iterator adaptors
141141
142-
The `IteratorUtil` trait implements common algorithms as methods extending
143-
every `Iterator` implementation. For example, the `fold` method will accumulate
144-
the items yielded by an `Iterator` into a single value:
142+
The `Iterator` trait provides many common algorithms as default methods. For
143+
example, the `fold` method will accumulate the items yielded by an `Iterator`
144+
into a single value:
145145
146146
~~~
147147
let xs = [1, 9, 2, 3, 14, 12];
@@ -154,14 +154,10 @@ Some adaptors return an adaptor object implementing the `Iterator` trait itself:
154154
~~~
155155
let xs = [1, 9, 2, 3, 14, 12];
156156
let ys = [5, 2, 1, 8];
157-
let sum = xs.iter().chain_(ys.iter()).fold(0, |a, b| a + *b);
157+
let sum = xs.iter().chain(ys.iter()).fold(0, |a, b| a + *b);
158158
assert_eq!(sum, 57);
159159
~~~
160160
161-
Note that some adaptors like the `chain_` method above use a trailing
162-
underscore to work around an issue with method resolve. The underscores will be
163-
dropped when they become unnecessary.
164-
165161
## For loops
166162
167163
The `for` keyword can be used as sugar for iterating through any iterator:
@@ -212,7 +208,7 @@ Iterators offer generic conversion to containers with the `collect` adaptor:
212208
213209
~~~
214210
let xs = [0, 1, 1, 2, 3, 5, 8];
215-
let ys = xs.rev_iter().skip(1).transform(|&x| x * 2).collect::<~[int]>();
211+
let ys = xs.rev_iter().skip(1).map(|&x| x * 2).collect::<~[int]>();
216212
assert_eq!(ys, ~[10, 6, 4, 2, 2, 0]);
217213
~~~
218214
@@ -307,13 +303,13 @@ for &x in it.invert() {
307303
The `rev_iter` and `mut_rev_iter` methods on vectors just return an inverted
308304
version of the standard immutable and mutable vector iterators.
309305
310-
The `chain_`, `transform`, `filter`, `filter_map` and `peek` adaptors are
306+
The `chain`, `map`, `filter`, `filter_map` and `inspect` adaptors are
311307
`DoubleEndedIterator` implementations if the underlying iterators are.
312308
313309
~~~
314310
let xs = [1, 2, 3, 4];
315311
let ys = [5, 6, 7, 8];
316-
let mut it = xs.iter().chain_(ys.iter()).transform(|&x| x * 2);
312+
let mut it = xs.iter().chain(ys.iter()).map(|&x| x * 2);
317313

318314
printfln!("%?", it.next()); // prints `Some(2)`
319315

@@ -329,13 +325,13 @@ The `RandomAccessIterator` trait represents an iterator offering random access
329325
to the whole range. The `indexable` method retrieves the number of elements
330326
accessible with the `idx` method.
331327
332-
The `chain_` adaptor is an implementation of `RandomAccessIterator` if the
328+
The `chain` adaptor is an implementation of `RandomAccessIterator` if the
333329
underlying iterators are.
334330
335331
~~~
336332
let xs = [1, 2, 3, 4, 5];
337333
let ys = ~[7, 9, 11];
338-
let mut it = xs.iter().chain_(ys.iter());
334+
let mut it = xs.iter().chain(ys.iter());
339335
printfln!("%?", it.idx(0)); // prints `Some(&1)`
340336
printfln!("%?", it.idx(5)); // prints `Some(&7)`
341337
printfln!("%?", it.idx(7)); // prints `Some(&11)`

branches/try2/mk/rt.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,7 @@ RUNTIME_CXXS_$(1)_$(2) := \
6868
rt/sync/rust_thread.cpp \
6969
rt/rust_builtin.cpp \
7070
rt/rust_run_program.cpp \
71-
rt/rust_env.cpp \
7271
rt/rust_rng.cpp \
73-
rt/rust_stack.cpp \
7472
rt/rust_upcall.cpp \
7573
rt/rust_uv.cpp \
7674
rt/rust_crate_map.cpp \

branches/try2/mk/target.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBSYNTAX_$(3)): \
6969
| $$(TLIB$(1)_T_$(2)_H_$(3))/
7070
@$$(call E, compile_and_link: $$@)
7171
$$(call REMOVE_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBSYNTAX_GLOB_$(2)),$$(notdir $$@))
72-
$$(STAGE$(1)_T_$(2)_H_$(3)) $(BORROWCK) --out-dir $$(@D) $$< && touch $$@
72+
$$(STAGE$(1)_T_$(2)_H_$(3)) $$(WFLAGS_ST$(1)) $(BORROWCK) --out-dir $$(@D) $$< && touch $$@
7373
$$(call LIST_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBSYNTAX_GLOB_$(2)),$$(notdir $$@))
7474

7575
# Only build the compiler for host triples
@@ -90,7 +90,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC_$(3)): \
9090
| $$(TLIB$(1)_T_$(2)_H_$(3))/
9191
@$$(call E, compile_and_link: $$@)
9292
$$(call REMOVE_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTC_GLOB_$(2)),$$(notdir $$@))
93-
$$(STAGE$(1)_T_$(2)_H_$(3)) --out-dir $$(@D) $$< && touch $$@
93+
$$(STAGE$(1)_T_$(2)_H_$(3)) $$(WFLAGS_ST$(1)) --out-dir $$(@D) $$< && touch $$@
9494
$$(call LIST_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTC_GLOB_$(2)),$$(notdir $$@))
9595

9696
$$(TBIN$(1)_T_$(2)_H_$(3))/rustc$$(X_$(3)): \

branches/try2/mk/tools.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTDOC_$(4)): \
6767
| $$(TLIB$(1)_T_$(4)_H_$(3))/
6868
@$$(call E, compile_and_link: $$@)
6969
$$(call REMOVE_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTDOC_GLOB_$(4)),$$(notdir $$@))
70-
$$(STAGE$(1)_T_$(4)_H_$(3)) --out-dir $$(@D) $$< && touch $$@
70+
$$(STAGE$(1)_T_$(4)_H_$(3)) $$(WFLAGS_ST$(1)) --out-dir $$(@D) $$< && touch $$@
7171
$$(call LIST_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTDOC_GLOB_$(4)),$$(notdir $$@))
7272

7373
$$(TBIN$(1)_T_$(4)_H_$(3))/rustdoc$$(X_$(4)): \
@@ -85,7 +85,7 @@ $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTI_$(4)): \
8585
| $$(TLIB$(1)_T_$(4)_H_$(3))/
8686
@$$(call E, compile_and_link: $$@)
8787
$$(call REMOVE_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTI_GLOB_$(4)),$$(notdir $$@))
88-
$$(STAGE$(1)_T_$(4)_H_$(3)) --out-dir $$(@D) $$< && touch $$@
88+
$$(STAGE$(1)_T_$(4)_H_$(3)) $$(WFLAGS_ST$(1)) --out-dir $$(@D) $$< && touch $$@
8989
$$(call LIST_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTI_GLOB_$(4)),$$(notdir $$@))
9090

9191
$$(TBIN$(1)_T_$(4)_H_$(3))/rusti$$(X_$(4)): \
@@ -106,7 +106,7 @@ $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUST_$(4)): \
106106
| $$(TLIB$(1)_T_$(4)_H_$(3))/
107107
@$$(call E, compile_and_link: $$@)
108108
$$(call REMOVE_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUST_GLOB_$(4)),$$(notdir $$@))
109-
$$(STAGE$(1)_T_$(4)_H_$(3)) --out-dir $$(@D) $$< && touch $$@
109+
$$(STAGE$(1)_T_$(4)_H_$(3)) $$(WFLAGS_ST$(1)) --out-dir $$(@D) $$< && touch $$@
110110
$$(call LIST_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUST_GLOB_$(4)),$$(notdir $$@))
111111

112112
$$(TBIN$(1)_T_$(4)_H_$(3))/rust$$(X_$(4)): \

branches/try2/src/compiletest/procsrv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pub fn run(lib_path: &str,
4949

5050
let env = env + target_env(lib_path, prog);
5151
let mut proc = run::Process::new(prog, args, run::ProcessOptions {
52-
env: Some(env.slice(0, env.len())),
52+
env: Some(env),
5353
dir: None,
5454
in_fd: None,
5555
out_fd: None,

branches/try2/src/compiletest/runtest.rs

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,30 @@ 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;
2729

2830
use extra::test::MetricMap;
2931

3032
pub fn run(config: config, testfile: ~str) {
31-
let mut _mm = MetricMap::new();
32-
run_metrics(config, testfile, &mut _mm);
33+
let config = Cell::new(config);
34+
let testfile = Cell::new(testfile);
35+
// FIXME #6436: Creating another thread to run the test because this
36+
// is going to call waitpid. The new scheduler has some strange
37+
// interaction between the blocking tasks and 'friend' schedulers
38+
// that destroys parallelism if we let normal schedulers block.
39+
// It should be possible to remove this spawn once std::run is
40+
// rewritten to be non-blocking.
41+
do spawn_sched(SingleThreaded) {
42+
let config = config.take();
43+
let testfile = testfile.take();
44+
let mut _mm = MetricMap::new();
45+
run_metrics(config, testfile, &mut _mm);
46+
}
3347
}
3448

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

0 commit comments

Comments
 (0)