Skip to content

Commit 3feaffd

Browse files
committed
---
yaml --- r: 144059 b: refs/heads/try2 c: fdaae34 h: refs/heads/master i: 144057: 872b9ec 144055: 4dff248 v: v3
1 parent f04b911 commit 3feaffd

File tree

517 files changed

+1971
-5021
lines changed

Some content is hidden

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

517 files changed

+1971
-5021
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: 758c5e823621d1a6ef57f7a3a3cd5ba19116a777
8+
refs/heads/try2: fdaae344785f11ff4226c6eaaacd7b8c954ca013
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: 15 additions & 11 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-
* `move_iter()` and `move_rev_iter`, to move the elements out by-value
115+
* `consume_iter()` and `consume_rev_iter`, to move the elements out by-value
116116
117117
A typical mutable container will implement at least `iter()`, `mut_iter()` and
118-
`move_iter()` along with the reverse variants if it maintains an order.
118+
`consume_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 `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:
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:
145145
146146
~~~
147147
let xs = [1, 9, 2, 3, 14, 12];
@@ -154,10 +154,14 @@ 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+
161165
## For loops
162166
163167
The `for` keyword can be used as sugar for iterating through any iterator:
@@ -208,7 +212,7 @@ Iterators offer generic conversion to containers with the `collect` adaptor:
208212
209213
~~~
210214
let xs = [0, 1, 1, 2, 3, 5, 8];
211-
let ys = xs.rev_iter().skip(1).map(|&x| x * 2).collect::<~[int]>();
215+
let ys = xs.rev_iter().skip(1).transform(|&x| x * 2).collect::<~[int]>();
212216
assert_eq!(ys, ~[10, 6, 4, 2, 2, 0]);
213217
~~~
214218
@@ -303,13 +307,13 @@ for &x in it.invert() {
303307
The `rev_iter` and `mut_rev_iter` methods on vectors just return an inverted
304308
version of the standard immutable and mutable vector iterators.
305309
306-
The `chain`, `map`, `filter`, `filter_map` and `inspect` adaptors are
310+
The `chain_`, `transform`, `filter`, `filter_map` and `peek` adaptors are
307311
`DoubleEndedIterator` implementations if the underlying iterators are.
308312
309313
~~~
310314
let xs = [1, 2, 3, 4];
311315
let ys = [5, 6, 7, 8];
312-
let mut it = xs.iter().chain(ys.iter()).map(|&x| x * 2);
316+
let mut it = xs.iter().chain_(ys.iter()).transform(|&x| x * 2);
313317

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

@@ -325,13 +329,13 @@ The `RandomAccessIterator` trait represents an iterator offering random access
325329
to the whole range. The `indexable` method retrieves the number of elements
326330
accessible with the `idx` method.
327331
328-
The `chain` adaptor is an implementation of `RandomAccessIterator` if the
332+
The `chain_` adaptor is an implementation of `RandomAccessIterator` if the
329333
underlying iterators are.
330334
331335
~~~
332336
let xs = [1, 2, 3, 4, 5];
333337
let ys = ~[7, 9, 11];
334-
let mut it = xs.iter().chain(ys.iter());
338+
let mut it = xs.iter().chain_(ys.iter());
335339
printfln!("%?", it.idx(0)); // prints `Some(&1)`
336340
printfln!("%?", it.idx(5)); // prints `Some(&7)`
337341
printfln!("%?", it.idx(7)); // prints `Some(&11)`

branches/try2/mk/rt.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ 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 \
7172
rt/rust_rng.cpp \
73+
rt/rust_stack.cpp \
7274
rt/rust_upcall.cpp \
7375
rt/rust_uv.cpp \
7476
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)) $$(WFLAGS_ST$(1)) $(BORROWCK) --out-dir $$(@D) $$< && touch $$@
72+
$$(STAGE$(1)_T_$(2)_H_$(3)) $(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)) $$(WFLAGS_ST$(1)) --out-dir $$(@D) $$< && touch $$@
93+
$$(STAGE$(1)_T_$(2)_H_$(3)) --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)) $$(WFLAGS_ST$(1)) --out-dir $$(@D) $$< && touch $$@
70+
$$(STAGE$(1)_T_$(4)_H_$(3)) --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)) $$(WFLAGS_ST$(1)) --out-dir $$(@D) $$< && touch $$@
88+
$$(STAGE$(1)_T_$(4)_H_$(3)) --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)) $$(WFLAGS_ST$(1)) --out-dir $$(@D) $$< && touch $$@
109+
$$(STAGE$(1)_T_$(4)_H_$(3)) --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),
52+
env: Some(env.slice(0, env.len())),
5353
dir: None,
5454
in_fd: None,
5555
out_fd: None,

branches/try2/src/compiletest/runtest.rs

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

3028
use extra::test::MetricMap;
3129

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

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

0 commit comments

Comments
 (0)