Skip to content

Commit 3327d4a

Browse files
committed
---
yaml --- r: 96190 b: refs/heads/dist-snap c: 543cae9 h: refs/heads/master v: v3
1 parent 81c23e2 commit 3327d4a

File tree

264 files changed

+3043
-3672
lines changed

Some content is hidden

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

264 files changed

+3043
-3672
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: c274a6888410ce3e357e014568b43310ed787d36
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: e12bc239b4e85d0dedc5ba6e9f7ffa0b91ade634
9+
refs/heads/dist-snap: 543cae9a464fda1f1652eb1b103e648472d5dd73
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/doc/po/ja/tutorial-tasks.md.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ msgstr ""
213213
#. type: Plain text
214214
#: doc/tutorial-tasks.md:102
215215
msgid ""
216-
"The `spawn` function has a very simple type signature: `fn spawn(f: proc())`. "
216+
"The `spawn` function has a very simple type signature: `fn spawn(f: ~fn())`. "
217217
"Because it accepts only owned closures, and owned closures contain only "
218218
"owned data, `spawn` can safely move the entire closure and all its "
219219
"associated state into an entirely different task for execution. Like any "

branches/dist-snap/doc/po/ja/tutorial.md.po

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3509,13 +3509,13 @@ msgstr "## 所有クロージャ"
35093509
#. type: Plain text
35103510
#: doc/tutorial.md:1510
35113511
msgid ""
3512-
"Owned closures, written `proc`, hold on to "
3512+
"Owned closures, written `~fn` in analogy to the `~` pointer type, hold on to "
35133513
"things that can safely be sent between processes. They copy the values they "
35143514
"close over, much like managed closures, but they also own them: that is, no "
35153515
"other code can access them. Owned closures are used in concurrent code, "
35163516
"particularly for spawning [tasks][tasks]."
35173517
msgstr ""
3518-
"`~` `proc` で書き表される所有クロージャは安全にプロセス"
3518+
"`~` ポインタ型と同様に `~fn` 型 で書き表される所有クロージャは安全にプロセス"
35193519
"間で送信することができます。所有クローじゃはマネージドクロージャと全く同じよ"
35203520
"うに閉じ込める値をコピーしますが、値を所有します。つまり、他のコードは閉じ込"
35213521
"められた値にアクセスできなくなります。所有クロージャは並列プログラム、特に "
@@ -3666,11 +3666,11 @@ msgstr ""
36663666
#: doc/tutorial.md:1582
36673667
msgid ""
36683668
"`do` is a convenient way to create tasks with the `task::spawn` function. "
3669-
"`spawn` has the signature `spawn(fn: proc())`. In other words, it is a "
3669+
"`spawn` has the signature `spawn(fn: ~fn())`. In other words, it is a "
36703670
"function that takes an owned closure that takes no arguments."
36713671
msgstr ""
36723672
"`task::spawn` 関数を用いてタスクを生成する場合、 `do` を用いると便利です。"
3673-
"`spawn` は、 `spawn(fn: proc())` という方を持っています。言い換えると、"
3673+
"`spawn` は、 `spawn(fn: ~fn())` という方を持っています。言い換えると、"
36743674
"`spawn` は「引数をとらない所有クロージャ」を引数としてとる関数ということで"
36753675
"す。"
36763676

branches/dist-snap/doc/po/tutorial-tasks.md.pot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ msgstr ""
213213
#. type: Plain text
214214
#: doc/tutorial-tasks.md:102
215215
msgid ""
216-
"The `spawn` function has a very simple type signature: `fn spawn(f: proc())`. "
216+
"The `spawn` function has a very simple type signature: `fn spawn(f: ~fn())`. "
217217
"Because it accepts only owned closures, and owned closures contain only "
218218
"owned data, `spawn` can safely move the entire closure and all its "
219219
"associated state into an entirely different task for execution. Like any "

branches/dist-snap/doc/po/tutorial.md.pot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2683,7 +2683,7 @@ msgstr ""
26832683
#. type: Plain text
26842684
#: doc/tutorial.md:1510
26852685
msgid ""
2686-
"Owned closures, written `proc`, hold on to "
2686+
"Owned closures, written `~fn` in analogy to the `~` pointer type, hold on to "
26872687
"things that can safely be sent between processes. They copy the values they "
26882688
"close over, much like managed closures, but they also own them: that is, no "
26892689
"other code can access them. Owned closures are used in concurrent code, "
@@ -2808,7 +2808,7 @@ msgstr ""
28082808
#: doc/tutorial.md:1582
28092809
msgid ""
28102810
"`do` is a convenient way to create tasks with the `task::spawn` function. "
2811-
"`spawn` has the signature `spawn(fn: proc())`. In other words, it is a "
2811+
"`spawn` has the signature `spawn(fn: ~fn())`. In other words, it is a "
28122812
"function that takes an owned closure that takes no arguments."
28132813
msgstr ""
28142814

branches/dist-snap/doc/rust.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1550,7 +1550,6 @@ keyword for struct fields and enum variants). When an item is declared as `pub`,
15501550
it can be thought of as being accessible to the outside world. For example:
15511551

15521552
~~~~
1553-
# fn main() {}
15541553
// Declare a private struct
15551554
struct Foo;
15561555

branches/dist-snap/doc/tutorial-container.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ Reaching the end of the iterator is signalled by returning `None` instead of
8787
`Some(item)`:
8888
8989
~~~
90-
# fn main() {}
9190
/// A stream of N zeroes
9291
struct ZeroStream {
9392
priv remaining: uint
@@ -302,7 +301,6 @@ the iterator can provide better information.
302301
The `ZeroStream` from earlier can provide an exact lower and upper bound:
303302

304303
~~~
305-
# fn main() {}
306304
/// A stream of N zeroes
307305
struct ZeroStream {
308306
priv remaining: uint

branches/dist-snap/doc/tutorial-macros.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ Now consider code like the following:
216216

217217
~~~~
218218
# enum t1 { good_1(t2, uint), bad_1 };
219-
# struct t2 { body: t3 }
219+
# pub struct t2 { body: t3 }
220220
# enum t3 { good_2(uint), bad_2};
221221
# fn f(x: t1) -> uint {
222222
match x {
@@ -262,7 +262,7 @@ macro_rules! biased_match (
262262
)
263263
264264
# enum t1 { good_1(t2, uint), bad_1 };
265-
# struct t2 { body: t3 }
265+
# pub struct t2 { body: t3 }
266266
# enum t3 { good_2(uint), bad_2};
267267
# fn f(x: t1) -> uint {
268268
biased_match!((x) ~ (good_1(g1, val)) else { return 0 };
@@ -364,7 +364,7 @@ macro_rules! biased_match (
364364
365365
366366
# enum t1 { good_1(t2, uint), bad_1 };
367-
# struct t2 { body: t3 }
367+
# pub struct t2 { body: t3 }
368368
# enum t3 { good_2(uint), bad_2};
369369
# fn f(x: t1) -> uint {
370370
biased_match!(

branches/dist-snap/doc/tutorial-tasks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ _owned types_. The language leaves the implementation details to the standard
9191
library.
9292

9393
The `spawn` function has a very simple type signature: `fn spawn(f:
94-
proc())`. Because it accepts only owned closures, and owned closures
94+
~fn())`. Because it accepts only owned closures, and owned closures
9595
contain only owned data, `spawn` can safely move the entire closure
9696
and all its associated state into an entirely different task for
9797
execution. Like any closure, the function passed to `spawn` may capture

branches/dist-snap/doc/tutorial.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,7 +1409,7 @@ pervasively in Rust code.
14091409
14101410
## Owned closures
14111411
1412-
Owned closures, written `proc`,
1412+
Owned closures, written `~fn` in analogy to the `~` pointer type,
14131413
hold on to things that can safely be sent between
14141414
processes. They copy the values they close over, much like managed
14151415
closures, but they also own them: that is, no other code can access
@@ -1484,7 +1484,7 @@ parentheses, where it looks more like a typical block of
14841484
code.
14851485
14861486
`do` is a convenient way to create tasks with the `task::spawn`
1487-
function. `spawn` has the signature `spawn(fn: proc())`. In other
1487+
function. `spawn` has the signature `spawn(fn: ~fn())`. In other
14881488
words, it is a function that takes an owned closure that takes no
14891489
arguments.
14901490
@@ -2568,7 +2568,6 @@ pub fn foo() { bar(); }
25682568
~~~
25692569
// c.rs
25702570
pub fn bar() { println("Baz!"); }
2571-
# fn main() {}
25722571
~~~
25732572

25742573
There also exist two short forms for importing multiple names at once:
@@ -2744,7 +2743,7 @@ Therefore, if you plan to compile your crate as a library, you should annotate i
27442743
#[link(name = "farm", vers = "2.5")];
27452744
27462745
// ...
2747-
# fn farm() {}
2746+
# pub fn farm() {}
27482747
~~~~
27492748

27502749
You can also in turn require in a `extern mod` statement that certain link metadata items match some criteria.
@@ -2770,7 +2769,7 @@ or setting the crate type (library or executable) explicitly:
27702769
27712770
// Turn on a warning
27722771
#[warn(non_camel_case_types)]
2773-
# fn farm() {}
2772+
# pub fn farm() {}
27742773
~~~~
27752774

27762775
If you're compiling your crate with `rustpkg`,
@@ -2791,9 +2790,7 @@ We define two crates, and use one of them as a library in the other.
27912790
~~~~
27922791
// world.rs
27932792
#[link(name = "world", vers = "0.42")];
2794-
# extern mod extra;
27952793
pub fn explore() -> &'static str { "world" }
2796-
# fn main() {}
27972794
~~~~
27982795

27992796
~~~~ {.xfail-test}

branches/dist-snap/mk/clean.mk

Lines changed: 17 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,13 @@
1212
# Cleanup
1313
######################################################################
1414

15-
CLEAN_STAGE_RULES := \
16-
$(foreach stage, $(STAGES), \
17-
$(foreach host, $(CFG_HOST), \
15+
CLEAN_STAGE_RULES = \
16+
$(foreach stage, $(STAGES), \
17+
$(foreach host, $(CFG_HOST), \
1818
clean$(stage)_H_$(host) \
19-
$(foreach target, $(CFG_TARGET), \
19+
$(foreach target, $(CFG_TARGET), \
2020
clean$(stage)_T_$(target)_H_$(host))))
2121

22-
CLEAN_STAGE_RULES := $(CLEAN_STAGE_RULES) \
23-
$(foreach host, $(CFG_HOST), clean-generic-H-$(host))
24-
25-
CLEAN_STAGE_RULES := $(CLEAN_STAGE_RULES) \
26-
$(foreach host, $(CFG_TARGET), clean-generic-T-$(host))
27-
2822
CLEAN_LLVM_RULES = \
2923
$(foreach target, $(CFG_HOST), \
3024
clean-llvm$(target))
@@ -39,6 +33,19 @@ clean: clean-misc $(CLEAN_STAGE_RULES)
3933

4034
clean-misc:
4135
@$(call E, cleaning)
36+
$(Q)find $(CFG_BUILD)/rustllvm \
37+
$(CFG_BUILD)/rt \
38+
$(CFG_BUILD)/test \
39+
-name '*.[odasS]' -o \
40+
-name '*.so' -o \
41+
-name '*.dylib' -o \
42+
-name '*.dll' -o \
43+
-name '*.def' -o \
44+
-name '*.bc' \
45+
| xargs rm -f
46+
$(Q)find $(CFG_BUILD)\
47+
-name '*.dSYM' \
48+
| xargs rm -Rf
4249
$(Q)rm -f $(RUNTIME_OBJS) $(RUNTIME_DEF)
4350
$(Q)rm -f $(RUSTLLVM_LIB_OBJS) $(RUSTLLVM_OBJS_OBJS) $(RUSTLLVM_DEF)
4451
$(Q)rm -Rf $(DOCS)
@@ -53,27 +60,6 @@ clean-misc:
5360
$(Q)rm -Rf $(foreach sub, index styles files search javascript, \
5461
$(wildcard doc/*/$(sub)))
5562

56-
define CLEAN_GENERIC
57-
58-
clean-generic-$(2)-$(1):
59-
$(Q)find $(1)/rustllvm \
60-
$(1)/rt \
61-
$(1)/test \
62-
-name '*.[odasS]' -o \
63-
-name '*.so' -o \
64-
-name '*.dylib' -o \
65-
-name '*.dll' -o \
66-
-name '*.def' -o \
67-
-name '*.bc' \
68-
| xargs rm -f
69-
$(Q)find $(1)\
70-
-name '*.dSYM' \
71-
| xargs rm -Rf
72-
endef
73-
74-
$(foreach host, $(CFG_HOST), $(eval $(call CLEAN_GENERIC,$(host),H)))
75-
$(foreach targ, $(CFG_TARGET), $(eval $(call CLEAN_GENERIC,$(targ),T)))
76-
7763
define CLEAN_HOST_STAGE_N
7864

7965
clean$(1)_H_$(2):

branches/dist-snap/mk/ctags.mk

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,7 @@
1515

1616
.PHONY: TAGS.emacs TAGS.vi
1717

18-
# This is using a blacklist approach, probably more durable than a whitelist.
19-
# We exclude: external dependencies (llvm, libuv, gyp, rt/{msvc,sundown,vg}),
20-
# tests (compiletest, test) and a couple of other things (rt/arch, etc)
21-
CTAGS_LOCATIONS=$(patsubst ${CFG_SRC_DIR}src/llvm,,\
22-
$(patsubst ${CFG_SRC_DIR}src/libuv,,\
23-
$(patsubst ${CFG_SRC_DIR}src/compiletest,,\
24-
$(patsubst ${CFG_SRC_DIR}src/test,,\
25-
$(patsubst ${CFG_SRC_DIR}src/gyp,,\
26-
$(patsubst ${CFG_SRC_DIR}src/etc,,\
27-
$(patsubst ${CFG_SRC_DIR}src/rt,,\
28-
$(patsubst ${CFG_SRC_DIR}src/rt/arch,,\
29-
$(patsubst ${CFG_SRC_DIR}src/rt/msvc,,\
30-
$(patsubst ${CFG_SRC_DIR}src/rt/sundown,,\
31-
$(patsubst ${CFG_SRC_DIR}src/rt/vg,,\
32-
$(wildcard ${CFG_SRC_DIR}src/*) $(wildcard ${CFG_SRC_DIR}src/rt/*)\
33-
)))))))))))
34-
CTAGS_OPTS=--options="${CFG_SRC_DIR}src/etc/ctags.rust" --languages=-javascript --recurse ${CTAGS_LOCATIONS}
35-
# We could use `--languages=Rust`, but there is value in producing tags for the
36-
# C++ parts of the code base too (at the time of writing, those are .h and .cpp
37-
# files in src/rt, src/rt/sync and src/rustllvm); we mainly just want to
38-
# exclude the external dependencies.
18+
CTAGS_OPTS=--options=${CFG_SRC_DIR}/src/etc/ctags.rust -R ${CFG_SRC_DIR}/src
3919

4020
TAGS.emacs:
4121
ctags -e -f $@ ${CTAGS_OPTS}

branches/dist-snap/mk/platform.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ CFG_LIB_GLOB_arm-apple-darwin = lib$(1)-*.dylib
206206
CFG_LIB_DSYM_GLOB_arm-apple-darwin = lib$(1)-*.dylib.dSYM
207207
CFG_GCCISH_CFLAGS_arm-apple-darwin := -Wall -Werror -g -fPIC $(CFG_IOS_FLAGS)
208208
CFG_GCCISH_CXXFLAGS_arm-apple-darwin := -fno-rtti $(CFG_IOS_FLAGS)
209-
CFG_GCCISH_LINK_FLAGS_arm-apple-darwin := -dynamiclib -lpthread -framework CoreServices -Wl,-no_compact_unwind
209+
CFG_GCCISH_LINK_FLAGS_arm-apple-darwin := -dynamiclib -lpthread -framework CoreServices -Wl,-no_compact_unwind
210210
CFG_GCCISH_DEF_FLAG_arm-apple-darwin := -Wl,-exported_symbols_list,
211211
CFG_GCCISH_PRE_LIB_FLAGS_arm-apple-darwin :=
212212
CFG_GCCISH_POST_LIB_FLAGS_arm-apple-darwin :=
@@ -506,7 +506,7 @@ define CFG_MAKE_TOOLCHAIN
506506
-c -o $$(1) $$(2)
507507
CFG_LINK_C_$(1) = $$(CC_$(1)) \
508508
$$(CFG_GCCISH_LINK_FLAGS) -o $$(1) \
509-
$$(CFG_GCCISH_LINK_FLAGS_$(1)) \
509+
$$(CFG_GCCISH_LINK_FLAGS_$(1))) \
510510
$$(CFG_GCCISH_DEF_FLAG_$(1))$$(3) $$(2) \
511511
$$(call CFG_INSTALL_NAME_$(1),$$(4))
512512
CFG_COMPILE_CXX_$(1) = $$(CXX_$(1)) \

branches/dist-snap/mk/rt.mk

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -90,18 +90,14 @@ endif
9090
endif
9191

9292
RUNTIME_CXXS_$(1)_$(2) := \
93-
rt/rust_cxx_glue.cpp
93+
rt/sync/lock_and_signal.cpp \
94+
rt/rust_builtin.cpp \
95+
rt/rust_upcall.cpp \
96+
rt/miniz.cpp \
97+
rt/rust_android_dummy.cpp \
98+
rt/rust_test_helpers.cpp
9499

95-
RUNTIME_CS_$(1)_$(2) := \
96-
rt/rust_builtin.c \
97-
rt/rust_upcall.c \
98-
rt/miniz.c \
99-
rt/rust_android_dummy.c \
100-
rt/rust_test_helpers.c
101-
102-
# stage0 remove this after the next snapshot
103-
%.cpp:
104-
@touch tmp/foo.o
100+
RUNTIME_CS_$(1)_$(2) :=
105101

106102
RUNTIME_S_$(1)_$(2) := rt/arch/$$(HOST_$(1))/_context.S \
107103
rt/arch/$$(HOST_$(1))/record_sp.S
@@ -119,7 +115,7 @@ ALL_OBJ_FILES += $$(RUNTIME_OBJS_$(1)_$(2))
119115
MORESTACK_OBJS_$(1)_$(2) := $$(RT_BUILD_DIR_$(1)_$(2))/arch/$$(HOST_$(1))/morestack.o
120116
ALL_OBJ_FILES += $$(MORESTACK_OBJS_$(1)_$(2))
121117

122-
$$(RT_BUILD_DIR_$(1)_$(2))/rust_cxx_glue.o: rt/rust_cxx_glue.cpp $$(MKFILE_DEPS)
118+
$$(RT_BUILD_DIR_$(1)_$(2))/%.o: rt/%.cpp $$(MKFILE_DEPS)
123119
@$$(call E, compile: $$@)
124120
$$(Q)$$(call CFG_COMPILE_CXX_$(1), $$@, $$(RUNTIME_INCS_$(1)_$(2)) \
125121
$$(SNAP_DEFINES) $$(RUNTIME_CXXFLAGS_$(1)_$(2))) $$<
@@ -246,13 +242,13 @@ endif
246242
UV_SUPPORT_NAME_$(1) := $$(call CFG_STATIC_LIB_NAME_$(1),uv_support)
247243
UV_SUPPORT_DIR_$(1) := $$(RT_OUTPUT_DIR_$(1))/uv_support
248244
UV_SUPPORT_LIB_$(1) := $$(UV_SUPPORT_DIR_$(1))/$$(UV_SUPPORT_NAME_$(1))
249-
UV_SUPPORT_CS_$(1) := rt/rust_uv.c
250-
UV_SUPPORT_OBJS_$(1) := $$(UV_SUPPORT_CS_$(1):rt/%.c=$$(UV_SUPPORT_DIR_$(1))/%.o)
245+
UV_SUPPORT_CS_$(1) := rt/rust_uv.cpp
246+
UV_SUPPORT_OBJS_$(1) := $$(UV_SUPPORT_CS_$(1):rt/%.cpp=$$(UV_SUPPORT_DIR_$(1))/%.o)
251247

252-
$$(UV_SUPPORT_DIR_$(1))/%.o: rt/%.c
248+
$$(UV_SUPPORT_DIR_$(1))/%.o: rt/%.cpp
253249
@$$(call E, compile: $$@)
254250
@mkdir -p $$(@D)
255-
$$(Q)$$(call CFG_COMPILE_C_$(1), $$@, \
251+
$$(Q)$$(call CFG_COMPILE_CXX_$(1), $$@, \
256252
-I $$(S)src/libuv/include \
257253
$$(RUNTIME_CFLAGS_$(1))) $$<
258254

branches/dist-snap/src/etc/adb_run_wrapper.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
# Sometimes android shell produce exitcode "1 : Text File Busy"
66
# Retry after $WAIT seconds, expecting resource cleaned-up
77
WAIT=10
8-
TEST_PATH=$1
9-
BIN_PATH=/system/bin
10-
if [ -d "$TEST_PATH" ]
8+
PATH=$1
9+
if [ -d "$PATH" ]
1110
then
1211
shift
1312
RUN=$1
@@ -18,10 +17,10 @@ then
1817

1918
L_RET=1
2019
L_COUNT=0
21-
cd $TEST_PATH
20+
cd $PATH
2221
while [ $L_RET -eq 1 ]
2322
do
24-
TEST_EXEC_ENV=22 LD_LIBRARY_PATH=$TEST_PATH PATH=$BIN_PATH:$TEST_PATH $TEST_PATH/$RUN $@ 1>$TEST_PATH/$RUN.stdout 2>$TEST_PATH/$RUN.stderr
23+
TEST_EXEC_ENV=22 LD_LIBRARY_PATH=$PATH $PATH/$RUN $@ 1>$PATH/$RUN.stdout 2>$PATH/$RUN.stderr
2524
L_RET=$?
2625
if [ $L_COUNT -gt 0 ]
2726
then
@@ -31,7 +30,7 @@ then
3130
L_COUNT=$((L_COUNT+1))
3231
done
3332

34-
echo $L_RET > $TEST_PATH/$RUN.exitcode
33+
echo $L_RET > $PATH/$RUN.exitcode
3534

3635
fi
3736
fi

0 commit comments

Comments
 (0)