Skip to content

Commit 8c22b1d

Browse files
committed
---
yaml --- r: 140463 b: refs/heads/try2 c: 4dd0fa6 h: refs/heads/master i: 140461: 89efb0b 140459: d28672b 140455: 41fac3c 140447: 0deda54 v: v3
1 parent dfaeb83 commit 8c22b1d

File tree

579 files changed

+4566
-4961
lines changed

Some content is hidden

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

579 files changed

+4566
-4961
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: 3b299e8140326fbb3eee0e6274110c0b00019c26
8+
refs/heads/try2: 4dd0fa68766e84499bd1680043b38a34a9fc7606
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/.gitattributes

Lines changed: 0 additions & 9 deletions
This file was deleted.

branches/try2/COPYRIGHT

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,3 +367,4 @@ their own copyright notices and license terms:
367367
has chosen for the collective work, enumerated at the top
368368
of this file. The only difference is the retention of
369369
copyright itself, held by the contributor.
370+

branches/try2/Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ $(foreach target,$(CFG_TARGET_TRIPLES),\
238238

239239
CORELIB_CRATE := $(S)src/libcore/core.rc
240240
CORELIB_INPUTS := $(wildcard $(addprefix $(S)src/libcore/, \
241-
core.rc *.rs */*.rs */*/*rs */*/*/*rs))
241+
core.rc *.rs */*.rs */*/*rs))
242242

243243
######################################################################
244244
# Standard library variables

branches/try2/RELEASES.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ Version 0.3 (July 2012)
250250
* Slices and fixed-size, interior-allocated vectors
251251
* #!-comments for lang versioning, shell execution
252252
* Destructors and iface implementation for classes;
253-
type-parameterized classes and class methods
253+
type-parameterized classes and class methods
254254
* 'const' type kind for types that can be used to implement
255255
shared-memory concurrency patterns
256256

@@ -261,7 +261,7 @@ Version 0.3 (July 2012)
261261
'crust', 'native' (now 'extern'), 'cont' (now 'again')
262262

263263
* Constructs: do-while loops ('do' repurposed), fn binding,
264-
resources (replaced by destructors)
264+
resources (replaced by destructors)
265265

266266
* Compiler reorganization
267267
* Syntax-layer of compiler split into separate crate
@@ -276,7 +276,7 @@ Version 0.3 (July 2012)
276276
* Extensive work on libuv interface
277277
* Much vector code moved to libraries
278278
* Syntax extensions: #line, #col, #file, #mod, #stringify,
279-
#include, #include_str, #include_bin
279+
#include, #include_str, #include_bin
280280

281281
* Tool improvements
282282
* Cargo automatically resolves dependencies

branches/try2/doc/README

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The markdown docs are only generated by make when node is installed (use
2-
`make doc`). If you don't have node installed you can generate them yourself.
3-
Unfortunately there's no real standard for markdown and all the tools work
2+
`make doc`). If you don't have node installed you can generate them yourself.
3+
Unfortunately there's no real standard for markdown and all the tools work
44
differently. pandoc is one that seems to work well.
55

66
To generate an html version of a doc do something like:
@@ -10,4 +10,4 @@ The syntax for pandoc flavored markdown can be found at:
1010
http://johnmacfarlane.net/pandoc/README.html#pandocs-markdown
1111

1212
A nice quick reference (for non-pandoc markdown) is at:
13-
http://kramdown.rubyforge.org/quickref.html
13+
http://kramdown.rubyforge.org/quickref.html

branches/try2/doc/rust.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3351,3 +3351,4 @@ Additional specific influences can be seen from the following languages:
33513351
* The typeclass system of Haskell.
33523352
* The lexical identifier rule of Python.
33533353
* The block syntax of Ruby.
3354+

branches/try2/doc/tutorial-ffi.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,11 @@ wrapping `malloc` and `free`:
150150

151151
~~~~
152152
use core::libc::{c_void, size_t, malloc, free};
153-
use core::unstable::intrinsics;
153+
154+
#[abi = "rust-intrinsic"]
155+
extern "rust-intrinsic" mod rusti {
156+
fn init<T>() -> T;
157+
}
154158
155159
// a wrapper around the handle returned by the foreign code
156160
pub struct Unique<T> {
@@ -162,8 +166,7 @@ pub impl<'self, T: Owned> Unique<T> {
162166
unsafe {
163167
let ptr = malloc(core::sys::size_of::<T>() as size_t) as *mut T;
164168
assert!(!ptr::is_null(ptr));
165-
// `*ptr` is uninitialized, and `*ptr = value` would attempt to destroy it
166-
intrinsics::move_val_init(&mut *ptr, value);
169+
*ptr = value;
167170
Unique{ptr: ptr}
168171
}
169172
}
@@ -183,7 +186,7 @@ pub impl<'self, T: Owned> Unique<T> {
183186
impl<T: Owned> Drop for Unique<T> {
184187
fn finalize(&self) {
185188
unsafe {
186-
let mut x = intrinsics::init(); // dummy value to swap in
189+
let mut x = rusti::init(); // dummy value to swap in
187190
x <-> *self.ptr; // moving the object out is needed to call the destructor
188191
free(self.ptr as *c_void)
189192
}

branches/try2/doc/tutorial-macros.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,3 +402,4 @@ tricky. Invoking the `log_syntax!` macro can help elucidate intermediate
402402
states, invoking `trace_macros!(true)` will automatically print those
403403
intermediate states out, and passing the flag `--pretty expanded` as a
404404
command-line argument to the compiler will show the result of expansion.
405+

branches/try2/doc/tutorial-tasks.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,3 +511,4 @@ The parent task first calls `DuplexStream` to create a pair of bidirectional
511511
endpoints. It then uses `task::spawn` to create the child task, which captures
512512
one end of the communication channel. As a result, both parent and child can
513513
send and receive data to and from the other.
514+

branches/try2/doc/tutorial.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,9 +1006,9 @@ let mut d = @mut 5; // mutable variable, mutable box
10061006
d = @mut 15;
10071007
~~~~
10081008

1009-
A mutable variable and an immutable variable can refer to the same box, given
1010-
that their types are compatible. Mutability of a box is a property of its type,
1011-
however, so for example a mutable handle to an immutable box cannot be
1009+
A mutable variable and an immutable variable can refer to the same box, given
1010+
that their types are compatible. Mutability of a box is a property of its type,
1011+
however, so for example a mutable handle to an immutable box cannot be
10121012
assigned a reference to a mutable box.
10131013

10141014
~~~~
@@ -1041,7 +1041,7 @@ let y = x.clone(); // y is a newly allocated box
10411041
let z = x; // no new memory allocated, x can no longer be used
10421042
~~~~
10431043

1044-
Since in owned boxes mutability is a property of the owner, not the
1044+
Since in owned boxes mutability is a property of the owner, not the
10451045
box, mutable boxes may become immutable when they are moved, and vice-versa.
10461046

10471047
~~~~

branches/try2/doc/version_info.html.template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77
</center>
88

99
</div>
10+

branches/try2/mk/docs.mk

Lines changed: 39 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,15 @@ DOCS :=
1616

1717

1818
######################################################################
19-
# Docs, from pandoc, rustdoc (which runs pandoc), and node
19+
# Pandoc (reference-manual related)
2020
######################################################################
21+
ifeq ($(CFG_PANDOC),)
22+
$(info cfg: no pandoc found, omitting doc/rust.pdf)
23+
else
24+
25+
ifeq ($(CFG_NODE),)
26+
$(info cfg: no node found, omitting doc/tutorial.html)
27+
else
2128

2229
doc/rust.css: rust.css
2330
@$(call E, cp: $@)
@@ -27,18 +34,6 @@ doc/manual.css: manual.css
2734
@$(call E, cp: $@)
2835
$(Q)cp -a $< $@ 2> /dev/null
2936

30-
ifeq ($(CFG_PANDOC),)
31-
$(info cfg: no pandoc found, omitting docs)
32-
NO_DOCS = 1
33-
endif
34-
35-
ifeq ($(CFG_NODE),)
36-
$(info cfg: no node found, omitting docs)
37-
NO_DOCS = 1
38-
endif
39-
40-
ifneq ($(NO_DOCS),1)
41-
4237
DOCS += doc/rust.html
4338
doc/rust.html: rust.md doc/version_info.html doc/rust.css doc/manual.css
4439
@$(call E, pandoc: $@)
@@ -52,8 +47,19 @@ doc/rust.html: rust.md doc/version_info.html doc/rust.css doc/manual.css
5247
--css=manual.css \
5348
--include-before-body=doc/version_info.html \
5449
--output=$@
50+
endif
5551

56-
DOCS += doc/rust.tex
52+
ifeq ($(CFG_PDFLATEX),)
53+
$(info cfg: no pdflatex found, omitting doc/rust.pdf)
54+
else
55+
ifeq ($(CFG_XETEX),)
56+
$(info cfg: no xetex found, disabling doc/rust.pdf)
57+
else
58+
ifeq ($(CFG_LUATEX),)
59+
$(info cfg: lacking luatex, disabling pdflatex)
60+
else
61+
62+
DOCS += doc/rust.pdf
5763
doc/rust.tex: rust.md doc/version.md
5864
@$(call E, pandoc: $@)
5965
$(Q)$(CFG_NODE) $(S)doc/prep.js $< | \
@@ -64,6 +70,17 @@ doc/rust.tex: rust.md doc/version.md
6470
--from=markdown --to=latex \
6571
--output=$@
6672

73+
doc/rust.pdf: doc/rust.tex
74+
@$(call E, pdflatex: $@)
75+
$(Q)$(CFG_PDFLATEX) \
76+
-interaction=batchmode \
77+
-output-directory=doc \
78+
$<
79+
80+
endif
81+
endif
82+
endif
83+
6784
DOCS += doc/rustpkg.html
6885
doc/rustpkg.html: rustpkg.md doc/version_info.html doc/rust.css doc/manual.css
6986
@$(call E, pandoc: $@)
@@ -78,6 +95,13 @@ doc/rustpkg.html: rustpkg.md doc/version_info.html doc/rust.css doc/manual.css
7895
--include-before-body=doc/version_info.html \
7996
--output=$@
8097

98+
######################################################################
99+
# Node (tutorial related)
100+
######################################################################
101+
ifeq ($(CFG_NODE),)
102+
$(info cfg: no node found, omitting doc/tutorial.html)
103+
else
104+
81105
DOCS += doc/tutorial.html
82106
doc/tutorial.html: tutorial.md doc/version_info.html doc/rust.css
83107
@$(call E, pandoc: $@)
@@ -129,29 +153,9 @@ doc/tutorial-tasks.html: tutorial-tasks.md doc/version_info.html doc/rust.css
129153
--include-before-body=doc/version_info.html \
130154
--output=$@
131155

132-
ifeq ($(CFG_PDFLATEX),)
133-
$(info cfg: no pdflatex found, omitting doc/rust.pdf)
134-
else
135-
ifeq ($(CFG_XETEX),)
136-
$(info cfg: no xetex found, disabling doc/rust.pdf)
137-
else
138-
ifeq ($(CFG_LUATEX),)
139-
$(info cfg: lacking luatex, disabling pdflatex)
140-
else
141-
142-
DOCS += doc/rust.pdf
143-
doc/rust.pdf: doc/rust.tex
144-
@$(call E, pdflatex: $@)
145-
$(Q)$(CFG_PDFLATEX) \
146-
-interaction=batchmode \
147-
-output-directory=doc \
148-
$<
149-
150-
endif
151-
endif
152156
endif
157+
endif
153158

154-
endif # No pandoc / node
155159

156160
######################################################################
157161
# LLnextgen (grammar analysis from refman)

branches/try2/mk/host.mk

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ $$(HBIN$(2)_H_$(4))/rustc$$(X_$(4)): \
2929
$$(HLIB$(2)_H_$(4))/$(CFG_RUSTLLVM_$(4)) \
3030
$$(HLIB$(2)_H_$(4))/$(CFG_LIBRUSTC_$(4)) \
3131
$$(HCORELIB_DEFAULT$(2)_H_$(4)) \
32-
$$(HSTDLIB_DEFAULT$(2)_H_$(4))
32+
$$(HSTDLIB_DEFAULT$(2)_H_$(4)) \
33+
| $$(HBIN$(2)_H_$(4))/
34+
3335
@$$(call E, cp: $$@)
3436
$$(Q)cp $$< $$@
3537

@@ -39,7 +41,9 @@ $$(HLIB$(2)_H_$(4))/$(CFG_LIBRUSTC_$(4)): \
3941
$$(HLIB$(2)_H_$(4))/$(CFG_RUNTIME_$(4)) \
4042
$$(HLIB$(2)_H_$(4))/$(CFG_RUSTLLVM_$(4)) \
4143
$$(HCORELIB_DEFAULT$(2)_H_$(4)) \
42-
$$(HSTDLIB_DEFAULT$(2)_H_$(4))
44+
$$(HSTDLIB_DEFAULT$(2)_H_$(4)) \
45+
| $$(HBIN$(2)_H_$(4))/
46+
4347
@$$(call E, cp: $$@)
4448
$$(Q)cp $$< $$@
4549
$$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUSTC_GLOB_$(4)) \
@@ -51,21 +55,24 @@ $$(HLIB$(2)_H_$(4))/$(CFG_LIBSYNTAX_$(4)): \
5155
$$(HLIB$(2)_H_$(4))/$(CFG_RUNTIME_$(4)) \
5256
$$(HLIB$(2)_H_$(4))/$(CFG_RUSTLLVM_$(4)) \
5357
$$(HCORELIB_DEFAULT$(2)_H_$(4)) \
54-
$$(HSTDLIB_DEFAULT$(2)_H_$(4))
58+
$$(HSTDLIB_DEFAULT$(2)_H_$(4)) \
59+
| $$(HBIN$(2)_H_$(4))/
5560
@$$(call E, cp: $$@)
5661
$$(Q)cp $$< $$@
5762
$$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBSYNTAX_GLOB_$(4)) \
5863
$$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBSYNTAX_DSYM_GLOB_$(4))) \
5964
$$(HLIB$(2)_H_$(4))
6065

6166
$$(HLIB$(2)_H_$(4))/$(CFG_RUNTIME_$(4)): \
62-
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_RUNTIME_$(4))
67+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_RUNTIME_$(4)) \
68+
| $$(HBIN$(2)_H_$(4))/
6369
@$$(call E, cp: $$@)
6470
$$(Q)cp $$< $$@
6571

6672
$$(HLIB$(2)_H_$(4))/$(CFG_CORELIB_$(4)): \
6773
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_CORELIB_$(4)) \
68-
$$(HLIB$(2)_H_$(4))/$(CFG_RUNTIME_$(4))
74+
$$(HLIB$(2)_H_$(4))/$(CFG_RUNTIME_$(4)) \
75+
| $$(HBIN$(2)_H_$(4))/
6976
@$$(call E, cp: $$@)
7077
$$(Q)cp $$< $$@
7178
# Subtle: We do not let the shell expand $(CORELIB_DSYM_GLOB) directly rather
@@ -82,7 +89,8 @@ $$(HLIB$(2)_H_$(4))/$(CFG_CORELIB_$(4)): \
8289
$$(HLIB$(2)_H_$(4))/$(CFG_STDLIB_$(4)): \
8390
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_STDLIB_$(4)) \
8491
$$(HLIB$(2)_H_$(4))/$(CFG_CORELIB_$(4)) \
85-
$$(HLIB$(2)_H_$(4))/$(CFG_RUNTIME_$(4))
92+
$$(HLIB$(2)_H_$(4))/$(CFG_RUNTIME_$(4)) \
93+
| $$(HBIN$(2)_H_$(4))/
8694
@$$(call E, cp: $$@)
8795
$$(Q)cp $$< $$@
8896
$$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(STDLIB_GLOB_$(4)) \
@@ -91,30 +99,37 @@ $$(HLIB$(2)_H_$(4))/$(CFG_STDLIB_$(4)): \
9199

92100
$$(HLIB$(2)_H_$(4))/libcore.rlib: \
93101
$$(TLIB$(1)_T_$(4)_H_$(3))/libcore.rlib \
94-
$$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME_$(4))
102+
$$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME_$(4)) \
103+
| $$(HBIN$(2)_H_$(4))/
95104
@$$(call E, cp: $$@)
96105
$$(Q)cp $$< $$@
97106

98107
$$(HLIB$(2)_H_$(4))/libstd.rlib: \
99108
$$(TLIB$(1)_T_$(4)_H_$(3))/libstd.rlib \
100109
$$(HLIB$(2)_H_$(4))/libcore.rlib \
101-
$$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME_$(4))
110+
$$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME_$(4)) \
111+
| $$(HBIN$(2)_H_$(4))/
102112
@$$(call E, cp: $$@)
103113
$$(Q)cp $$< $$@
104114

105115
$$(HLIB$(2)_H_$(4))/librustc.rlib: \
106116
$$(TLIB$(1)_T_$(4)_H_$(3))/librustc.rlib \
107117
$$(HLIB$(2)_H_$(4))/libcore.rlib \
108118
$$(HLIB$(2)_H_$(4))/libstd.rlib \
109-
$$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME_$(4))
119+
$$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME_$(4)) \
120+
| $$(HBIN$(2)_H_$(4))/
110121
@$$(call E, cp: $$@)
111122
$$(Q)cp $$< $$@
112123

113124
$$(HLIB$(2)_H_$(4))/$(CFG_RUSTLLVM_$(4)): \
114-
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_RUSTLLVM_$(4))
125+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_RUSTLLVM_$(4)) \
126+
| $$(HBIN$(2)_H_$(4))/
115127
@$$(call E, cp: $$@)
116128
$$(Q)cp $$< $$@
117129

130+
$$(HBIN$(2)_H_$(4))/:
131+
mkdir -p $@
132+
118133
endef
119134

120135
$(foreach t,$(CFG_HOST_TRIPLES), \

branches/try2/mk/platform.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
# Create variables HOST_<triple> containing the host part
1313
# of each target triple. For example, the triple i686-darwin-macos
14-
# would create a variable HOST_i686-darwin-macos with the value
14+
# would create a variable HOST_i686-darwin-macos with the value
1515
# i386.
1616
define DEF_HOST_VAR
1717
HOST_$(1) = $(subst i686,i386,$(word 1,$(subst -, ,$(1))))
@@ -276,8 +276,8 @@ CFG_GCCISH_CFLAGS_i686-pc-mingw32 := -Wall -Werror -g -march=i686
276276
CFG_GCCISH_CXXFLAGS_i686-pc-mingw32 := -fno-rtti
277277
CFG_GCCISH_LINK_FLAGS_i686-pc-mingw32 := -shared -fPIC -g
278278
CFG_GCCISH_DEF_FLAG_i686-pc-mingw32 :=
279-
CFG_GCCISH_PRE_LIB_FLAGS_i686-pc-mingw32 :=
280-
CFG_GCCISH_POST_LIB_FLAGS_i686-pc-mingw32 :=
279+
CFG_GCCISH_PRE_LIB_FLAGS_i686-pc-mingw32 :=
280+
CFG_GCCISH_POST_LIB_FLAGS_i686-pc-mingw32 :=
281281
CFG_DEF_SUFFIX_i686-pc-mingw32 := .mingw32.def
282282
CFG_INSTALL_NAME_i686-pc-mingw32 =
283283
CFG_LIBUV_LINK_FLAGS_i686-pc-mingw32 := -lWs2_32 -lpsapi -liphlpapi

0 commit comments

Comments
 (0)