Skip to content

Commit 43e1560

Browse files
committed
---
yaml --- r: 143347 b: refs/heads/try2 c: 6dc5e2c h: refs/heads/master i: 143345: 8a63827 143343: a0f70bd v: v3
1 parent 635f3a9 commit 43e1560

File tree

167 files changed

+3830
-2724
lines changed

Some content is hidden

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

167 files changed

+3830
-2724
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: d0f54a5cfb13e9ec437083666eb1b2cca6a39941
8+
refs/heads/try2: 6dc5e2c61f828aeeb2eeffbb235938edbe18c809
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/doc/po/tutorial-tasks.md.pot

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ msgstr ""
135135
#. type: Bullet: '* '
136136
#: doc/tutorial-tasks.md:56
137137
msgid ""
138-
"[`extra::arc`] - The ARC (atomically reference counted) type, for safely "
138+
"[`extra::arc`] - The Arc (atomically reference counted) type, for safely "
139139
"sharing immutable data,"
140140
msgstr ""
141141

@@ -597,7 +597,7 @@ msgstr ""
597597

598598
#. type: Plain text
599599
#: doc/tutorial-tasks.md:338
600-
msgid "## Sharing immutable data without copy: ARC"
600+
msgid "## Sharing immutable data without copy: Arc"
601601
msgstr ""
602602

603603
#. type: Plain text
@@ -613,18 +613,18 @@ msgstr ""
613613
#: doc/tutorial-tasks.md:347
614614
msgid ""
615615
"To tackle this issue, one can use an Atomically Reference Counted wrapper "
616-
"(`ARC`) as implemented in the `extra` library of Rust. With an ARC, the data "
617-
"will no longer be copied for each task. The ARC acts as a reference to the "
616+
"(`Arc`) as implemented in the `extra` library of Rust. With an Arc, the data "
617+
"will no longer be copied for each task. The Arc acts as a reference to the "
618618
"shared data and only this reference is shared and cloned."
619619
msgstr ""
620620

621621
#. type: Plain text
622622
#: doc/tutorial-tasks.md:355
623623
msgid ""
624-
"Here is a small example showing how to use ARCs. We wish to run concurrently "
624+
"Here is a small example showing how to use Arcs. We wish to run concurrently "
625625
"several computations on a single large vector of floats. Each task needs the "
626626
"full vector to perform its duty. ~~~ # use std::vec; # use std::uint; # use "
627-
"std::rand; use extra::arc::ARC;"
627+
"std::rand; use extra::arc::Arc;"
628628
msgstr ""
629629

630630
#. type: Plain text
@@ -648,7 +648,7 @@ msgstr ""
648648
#. type: Plain text
649649
#: doc/tutorial-tasks.md:365
650650
#, no-wrap
651-
msgid " let numbers_arc = ARC(numbers);\n"
651+
msgid " let numbers_arc = Arc::new(numbers);\n"
652652
msgstr ""
653653

654654
#. type: Plain text
@@ -665,7 +665,7 @@ msgstr ""
665665
#, no-wrap
666666
msgid ""
667667
" do spawn {\n"
668-
" let local_arc : ARC<~[float]> = port.recv();\n"
668+
" let local_arc : Arc<~[float]> = port.recv();\n"
669669
" let task_numbers = local_arc.get();\n"
670670
" println(fmt!(\"%u-norm = %?\", num, pnorm(task_numbers, num)));\n"
671671
" }\n"
@@ -679,31 +679,31 @@ msgstr ""
679679
msgid ""
680680
"The function `pnorm` performs a simple computation on the vector (it "
681681
"computes the sum of its items at the power given as argument and takes the "
682-
"inverse power of this value). The ARC on the vector is created by the line "
683-
"~~~ # use extra::arc::ARC; # use std::vec; # use std::rand; # let numbers = "
682+
"inverse power of this value). The Arc on the vector is created by the line "
683+
"~~~ # use extra::arc::Arc; # use std::vec; # use std::rand; # let numbers = "
684684
"vec::from_fn(1000000, |_| rand::random::<float>()); let "
685-
"numbers_arc=ARC(numbers); ~~~ and a clone of it is sent to each task ~~~ # "
686-
"use extra::arc::ARC; # use std::vec; # use std::rand; # let numbers=vec::"
685+
"numbers_arc=Arc::new(numbers); ~~~ and a clone of it is sent to each task ~~~ # "
686+
"use extra::arc::Arc; # use std::vec; # use std::rand; # let numbers=vec::"
687687
"from_fn(1000000, |_| rand::random::<float>()); # let numbers_arc = "
688-
"ARC(numbers); # let (port, chan) = stream(); chan.send(numbers_arc."
688+
"Arc::new(numbers); # let (port, chan) = stream(); chan.send(numbers_arc."
689689
"clone()); ~~~ copying only the wrapper and not its contents."
690690
msgstr ""
691691

692692
#. type: Plain text
693693
#: doc/tutorial-tasks.md:414
694694
msgid ""
695-
"Each task recovers the underlying data by ~~~ # use extra::arc::ARC; # use "
695+
"Each task recovers the underlying data by ~~~ # use extra::arc::Arc; # use "
696696
"std::vec; # use std::rand; # let numbers=vec::from_fn(1000000, |_| rand::"
697-
"random::<float>()); # let numbers_arc=ARC(numbers); # let (port, chan) = "
698-
"stream(); # chan.send(numbers_arc.clone()); # let local_arc : ARC<~[float]> "
697+
"random::<float>()); # let numbers_arc=Arc::new(numbers); # let (port, chan) = "
698+
"stream(); # chan.send(numbers_arc.clone()); # let local_arc : Arc<~[float]> "
699699
"= port.recv(); let task_numbers = local_arc.get(); ~~~ and can use it as if "
700700
"it were local."
701701
msgstr ""
702702

703703
#. type: Plain text
704704
#: doc/tutorial-tasks.md:416
705705
msgid ""
706-
"The `arc` module also implements ARCs around mutable data that are not "
706+
"The `arc` module also implements Arcs around mutable data that are not "
707707
"covered here."
708708
msgstr ""
709709

branches/try2/doc/rust.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1494,7 +1494,7 @@ mod m1 {
14941494
This example shows how one can use `allow` and `warn` to toggle
14951495
a particular check on and off.
14961496

1497-
~~~
1497+
~~~{.xfail-test}
14981498
#[warn(missing_doc)]
14991499
mod m2{
15001500
#[allow(missing_doc)]

branches/try2/doc/tutorial-container.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,14 @@ impl Iterator<int> for ZeroStream {
108108
## Container iterators
109109
110110
Containers implement iteration over the contained elements by returning an
111-
iterator object. For example, vector slices have four iterators available:
111+
iterator object. For example, vector slices several iterators available:
112112
113-
* `vector.iter()`, for immutable references to the elements
114-
* `vector.mut_iter()`, for mutable references to the elements
115-
* `vector.rev_iter()`, for immutable references to the elements in reverse order
116-
* `vector.mut_rev_iter()`, for mutable references to the elements in reverse order
113+
* `iter()` and `rev_iter()`, for immutable references to the elements
114+
* `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
116+
117+
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.
117119
118120
### Freezing
119121

branches/try2/doc/tutorial-tasks.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ concurrency at this writing:
5050
* [`std::pipes`] - The underlying messaging infrastructure,
5151
* [`extra::comm`] - Additional messaging types based on `std::pipes`,
5252
* [`extra::sync`] - More exotic synchronization tools, including locks,
53-
* [`extra::arc`] - The ARC (atomically reference counted) type,
53+
* [`extra::arc`] - The Arc (atomically reference counted) type,
5454
for safely sharing immutable data,
5555
* [`extra::future`] - A type representing values that may be computed concurrently and retrieved at a later time.
5656

@@ -334,24 +334,24 @@ fn main() {
334334
}
335335
~~~
336336

337-
## Sharing immutable data without copy: ARC
337+
## Sharing immutable data without copy: Arc
338338

339339
To share immutable data between tasks, a first approach would be to only use pipes as we have seen
340340
previously. A copy of the data to share would then be made for each task. In some cases, this would
341341
add up to a significant amount of wasted memory and would require copying the same data more than
342342
necessary.
343343

344-
To tackle this issue, one can use an Atomically Reference Counted wrapper (`ARC`) as implemented in
345-
the `extra` library of Rust. With an ARC, the data will no longer be copied for each task. The ARC
344+
To tackle this issue, one can use an Atomically Reference Counted wrapper (`Arc`) as implemented in
345+
the `extra` library of Rust. With an Arc, the data will no longer be copied for each task. The Arc
346346
acts as a reference to the shared data and only this reference is shared and cloned.
347347

348-
Here is a small example showing how to use ARCs. We wish to run concurrently several computations on
348+
Here is a small example showing how to use Arcs. We wish to run concurrently several computations on
349349
a single large vector of floats. Each task needs the full vector to perform its duty.
350350
~~~
351351
# use std::vec;
352352
# use std::uint;
353353
# use std::rand;
354-
use extra::arc::ARC;
354+
use extra::arc::Arc;
355355
356356
fn pnorm(nums: &~[float], p: uint) -> float {
357357
nums.iter().fold(0.0, |a,b| a+(*b).pow(&(p as float)) ).pow(&(1f / (p as float)))
@@ -361,14 +361,14 @@ fn main() {
361361
let numbers = vec::from_fn(1000000, |_| rand::random::<float>());
362362
println(fmt!("Inf-norm = %?", *numbers.iter().max().unwrap()));
363363
364-
let numbers_arc = ARC(numbers);
364+
let numbers_arc = Arc::new(numbers);
365365
366366
for uint::range(1,10) |num| {
367367
let (port, chan) = stream();
368368
chan.send(numbers_arc.clone());
369369
370370
do spawn {
371-
let local_arc : ARC<~[float]> = port.recv();
371+
let local_arc : Arc<~[float]> = port.recv();
372372
let task_numbers = local_arc.get();
373373
println(fmt!("%u-norm = %?", num, pnorm(task_numbers, num)));
374374
}
@@ -377,42 +377,42 @@ fn main() {
377377
~~~
378378

379379
The function `pnorm` performs a simple computation on the vector (it computes the sum of its items
380-
at the power given as argument and takes the inverse power of this value). The ARC on the vector is
380+
at the power given as argument and takes the inverse power of this value). The Arc on the vector is
381381
created by the line
382382
~~~
383-
# use extra::arc::ARC;
383+
# use extra::arc::Arc;
384384
# use std::vec;
385385
# use std::rand;
386386
# let numbers = vec::from_fn(1000000, |_| rand::random::<float>());
387-
let numbers_arc=ARC(numbers);
387+
let numbers_arc=Arc::new(numbers);
388388
~~~
389389
and a clone of it is sent to each task
390390
~~~
391-
# use extra::arc::ARC;
391+
# use extra::arc::Arc;
392392
# use std::vec;
393393
# use std::rand;
394394
# let numbers=vec::from_fn(1000000, |_| rand::random::<float>());
395-
# let numbers_arc = ARC(numbers);
395+
# let numbers_arc = Arc::new(numbers);
396396
# let (port, chan) = stream();
397397
chan.send(numbers_arc.clone());
398398
~~~
399399
copying only the wrapper and not its contents.
400400

401401
Each task recovers the underlying data by
402402
~~~
403-
# use extra::arc::ARC;
403+
# use extra::arc::Arc;
404404
# use std::vec;
405405
# use std::rand;
406406
# let numbers=vec::from_fn(1000000, |_| rand::random::<float>());
407-
# let numbers_arc=ARC(numbers);
407+
# let numbers_arc=Arc::new(numbers);
408408
# let (port, chan) = stream();
409409
# chan.send(numbers_arc.clone());
410-
# let local_arc : ARC<~[float]> = port.recv();
410+
# let local_arc : Arc<~[float]> = port.recv();
411411
let task_numbers = local_arc.get();
412412
~~~
413413
and can use it as if it were local.
414414

415-
The `arc` module also implements ARCs around mutable data that are not covered here.
415+
The `arc` module also implements Arcs around mutable data that are not covered here.
416416

417417
# Handling task failure
418418

branches/try2/doc/tutorial.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,6 +1154,7 @@ let mut x = 5;
11541154
let y = &x; // x is now frozen, it cannot be modified
11551155
}
11561156
// x is now unfrozen again
1157+
# x = 3;
11571158
~~~~
11581159
11591160
Mutable managed boxes handle freezing dynamically when any of their contents

branches/try2/mk/target.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_RUSTLLVM_$(3)): \
8484
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC_$(3)): CFG_COMPILER_TRIPLE = $(2)
8585
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC_$(3)): \
8686
$$(COMPILER_CRATE) $$(COMPILER_INPUTS) \
87+
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
8788
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBSYNTAX_$(3)) \
8889
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_RUSTLLVM_$(3)) \
8990
| $$(TLIB$(1)_T_$(2)_H_$(3))/
@@ -94,6 +95,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC_$(3)): \
9495

9596
$$(TBIN$(1)_T_$(2)_H_$(3))/rustc$$(X_$(3)): \
9697
$$(DRIVER_CRATE) \
98+
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
9799
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC_$(3)) \
98100
| $$(TBIN$(1)_T_$(2)_H_$(3))/
99101
@$$(call E, compile_and_link: $$@)

branches/try2/mk/tests.mk

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,50 +319,58 @@ endif
319319

320320
$(3)/stage$(1)/test/stdtest-$(2)$$(X_$(2)): \
321321
$$(STDLIB_CRATE) $$(STDLIB_INPUTS) \
322+
$$(SREQ$(1)_T_$(2)_H_$(3)) \
322323
$$(STDTESTDEP_$(1)_$(2)_$(3))
323324
@$$(call E, compile_and_link: $$@)
324325
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
325326

326327
$(3)/stage$(1)/test/extratest-$(2)$$(X_$(2)): \
327328
$$(EXTRALIB_CRATE) $$(EXTRALIB_INPUTS) \
329+
$$(SREQ$(1)_T_$(2)_H_$(3)) \
328330
$$(STDTESTDEP_$(1)_$(2)_$(3))
329331
@$$(call E, compile_and_link: $$@)
330332
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
331333

332334
$(3)/stage$(1)/test/syntaxtest-$(2)$$(X_$(2)): \
333335
$$(LIBSYNTAX_CRATE) $$(LIBSYNTAX_INPUTS) \
336+
$$(SREQ$(1)_T_$(2)_H_$(3)) \
334337
$$(STDTESTDEP_$(1)_$(2)_$(3))
335338
@$$(call E, compile_and_link: $$@)
336339
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
337340

338341
$(3)/stage$(1)/test/rustctest-$(2)$$(X_$(2)): CFG_COMPILER_TRIPLE = $(2)
339342
$(3)/stage$(1)/test/rustctest-$(2)$$(X_$(2)): \
340343
$$(COMPILER_CRATE) $$(COMPILER_INPUTS) \
344+
$$(SREQ$(1)_T_$(2)_H_$(3)) \
341345
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUSTLLVM_$(2)) \
342346
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBSYNTAX_$(2))
343347
@$$(call E, compile_and_link: $$@)
344348
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
345349

346350
$(3)/stage$(1)/test/rustpkgtest-$(2)$$(X_$(2)): \
347351
$$(RUSTPKG_LIB) $$(RUSTPKG_INPUTS) \
352+
$$(SREQ$(1)_T_$(2)_H_$(3)) \
348353
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC_$(2))
349354
@$$(call E, compile_and_link: $$@)
350355
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
351356

352357
$(3)/stage$(1)/test/rustitest-$(2)$$(X_$(2)): \
353358
$$(RUSTI_LIB) $$(RUSTI_INPUTS) \
359+
$$(SREQ$(1)_T_$(2)_H_$(3)) \
354360
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC_$(2))
355361
@$$(call E, compile_and_link: $$@)
356362
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
357363

358364
$(3)/stage$(1)/test/rusttest-$(2)$$(X_$(2)): \
359365
$$(RUST_LIB) $$(RUST_INPUTS) \
366+
$$(SREQ$(1)_T_$(2)_H_$(3)) \
360367
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC_$(2))
361368
@$$(call E, compile_and_link: $$@)
362369
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
363370

364371
$(3)/stage$(1)/test/rustdoctest-$(2)$$(X_$(2)): \
365372
$$(RUSTDOC_LIB) $$(RUSTDOC_INPUTS) \
373+
$$(SREQ$(1)_T_$(2)_H_$(3)) \
366374
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC_$(2))
367375
@$$(call E, compile_and_link: $$@)
368376
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test

0 commit comments

Comments
 (0)