Skip to content

Commit 7335c1c

Browse files
committed
---
yaml --- r: 96191 b: refs/heads/dist-snap c: 760942d h: refs/heads/master i: 96189: 81c23e2 96187: 0116053 96183: c91f76a 96175: 294935b 96159: 5c114df 96127: d68cdc4 v: v3
1 parent 3327d4a commit 7335c1c

File tree

262 files changed

+3672
-2943
lines changed

Some content is hidden

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

262 files changed

+3672
-2943
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: 543cae9a464fda1f1652eb1b103e648472d5dd73
9+
refs/heads/dist-snap: 760942d7d2a0701f526a5bc634419df7a1e941fe
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: ~fn())`. "
216+
"The `spawn` function has a very simple type signature: `fn spawn(f: proc())`. "
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 `~fn` in analogy to the `~` pointer type, hold on to "
3512+
"Owned closures, written `proc`, 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-
"`~` ポインタ型と同様に `~fn` 型 で書き表される所有クロージャは安全にプロセス"
3518+
"`~` `proc` で書き表される所有クロージャは安全にプロセス"
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: ~fn())`. In other words, it is a "
3669+
"`spawn` has the signature `spawn(fn: proc())`. 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: ~fn())` という方を持っています。言い換えると、"
3673+
"`spawn` は、 `spawn(fn: proc())` という方を持っています。言い換えると、"
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: ~fn())`. "
216+
"The `spawn` function has a very simple type signature: `fn spawn(f: proc())`. "
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 `~fn` in analogy to the `~` pointer type, hold on to "
2686+
"Owned closures, written `proc`, 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: ~fn())`. In other words, it is a "
2811+
"`spawn` has the signature `spawn(fn: proc())`. 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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1550,6 +1550,7 @@ 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() {}
15531554
// Declare a private struct
15541555
struct Foo;
15551556

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

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

303304
~~~
305+
# fn main() {}
304306
/// A stream of N zeroes
305307
struct ZeroStream {
306308
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-
# pub struct t2 { body: t3 }
219+
# 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-
# pub struct t2 { body: t3 }
265+
# 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-
# pub struct t2 { body: t3 }
367+
# 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-
~fn())`. Because it accepts only owned closures, and owned closures
94+
proc())`. 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: 7 additions & 4 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 `~fn` in analogy to the `~` pointer type,
1412+
Owned closures, written `proc`,
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: ~fn())`. In other
1487+
function. `spawn` has the signature `spawn(fn: proc())`. In other
14881488
words, it is a function that takes an owned closure that takes no
14891489
arguments.
14901490
@@ -2568,6 +2568,7 @@ pub fn foo() { bar(); }
25682568
~~~
25692569
// c.rs
25702570
pub fn bar() { println("Baz!"); }
2571+
# fn main() {}
25712572
~~~
25722573

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

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

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

27962799
~~~~ {.xfail-test}

branches/dist-snap/mk/clean.mk

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,19 @@
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+
2228
CLEAN_LLVM_RULES = \
2329
$(foreach target, $(CFG_HOST), \
2430
clean-llvm$(target))
@@ -33,19 +39,6 @@ clean: clean-misc $(CLEAN_STAGE_RULES)
3339

3440
clean-misc:
3541
@$(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
4942
$(Q)rm -f $(RUNTIME_OBJS) $(RUNTIME_DEF)
5043
$(Q)rm -f $(RUSTLLVM_LIB_OBJS) $(RUSTLLVM_OBJS_OBJS) $(RUSTLLVM_DEF)
5144
$(Q)rm -Rf $(DOCS)
@@ -60,6 +53,27 @@ clean-misc:
6053
$(Q)rm -Rf $(foreach sub, index styles files search javascript, \
6154
$(wildcard doc/*/$(sub)))
6255

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+
6377
define CLEAN_HOST_STAGE_N
6478

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

branches/dist-snap/mk/ctags.mk

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

1616
.PHONY: TAGS.emacs TAGS.vi
1717

18-
CTAGS_OPTS=--options=${CFG_SRC_DIR}/src/etc/ctags.rust -R ${CFG_SRC_DIR}/src
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.
1939

2040
TAGS.emacs:
2141
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: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,18 @@ endif
9090
endif
9191

9292
RUNTIME_CXXS_$(1)_$(2) := \
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
93+
rt/rust_cxx_glue.cpp
9994

100-
RUNTIME_CS_$(1)_$(2) :=
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
101105

102106
RUNTIME_S_$(1)_$(2) := rt/arch/$$(HOST_$(1))/_context.S \
103107
rt/arch/$$(HOST_$(1))/record_sp.S
@@ -115,7 +119,7 @@ ALL_OBJ_FILES += $$(RUNTIME_OBJS_$(1)_$(2))
115119
MORESTACK_OBJS_$(1)_$(2) := $$(RT_BUILD_DIR_$(1)_$(2))/arch/$$(HOST_$(1))/morestack.o
116120
ALL_OBJ_FILES += $$(MORESTACK_OBJS_$(1)_$(2))
117121

118-
$$(RT_BUILD_DIR_$(1)_$(2))/%.o: rt/%.cpp $$(MKFILE_DEPS)
122+
$$(RT_BUILD_DIR_$(1)_$(2))/rust_cxx_glue.o: rt/rust_cxx_glue.cpp $$(MKFILE_DEPS)
119123
@$$(call E, compile: $$@)
120124
$$(Q)$$(call CFG_COMPILE_CXX_$(1), $$@, $$(RUNTIME_INCS_$(1)_$(2)) \
121125
$$(SNAP_DEFINES) $$(RUNTIME_CXXFLAGS_$(1)_$(2))) $$<
@@ -242,13 +246,13 @@ endif
242246
UV_SUPPORT_NAME_$(1) := $$(call CFG_STATIC_LIB_NAME_$(1),uv_support)
243247
UV_SUPPORT_DIR_$(1) := $$(RT_OUTPUT_DIR_$(1))/uv_support
244248
UV_SUPPORT_LIB_$(1) := $$(UV_SUPPORT_DIR_$(1))/$$(UV_SUPPORT_NAME_$(1))
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)
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)
247251

248-
$$(UV_SUPPORT_DIR_$(1))/%.o: rt/%.cpp
252+
$$(UV_SUPPORT_DIR_$(1))/%.o: rt/%.c
249253
@$$(call E, compile: $$@)
250254
@mkdir -p $$(@D)
251-
$$(Q)$$(call CFG_COMPILE_CXX_$(1), $$@, \
255+
$$(Q)$$(call CFG_COMPILE_C_$(1), $$@, \
252256
-I $$(S)src/libuv/include \
253257
$$(RUNTIME_CFLAGS_$(1))) $$<
254258

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

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

1819
L_RET=1
1920
L_COUNT=0
20-
cd $PATH
21+
cd $TEST_PATH
2122
while [ $L_RET -eq 1 ]
2223
do
23-
TEST_EXEC_ENV=22 LD_LIBRARY_PATH=$PATH $PATH/$RUN $@ 1>$PATH/$RUN.stdout 2>$PATH/$RUN.stderr
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
2425
L_RET=$?
2526
if [ $L_COUNT -gt 0 ]
2627
then
@@ -30,7 +31,7 @@ then
3031
L_COUNT=$((L_COUNT+1))
3132
done
3233

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

3536
fi
3637
fi

0 commit comments

Comments
 (0)