Skip to content

Commit ff79ad2

Browse files
committed
---
yaml --- r: 36333 b: refs/heads/try2 c: 2af0885 h: refs/heads/master i: 36331: e2061a7 v: v3
1 parent 424e701 commit ff79ad2

File tree

251 files changed

+1800
-3471
lines changed

Some content is hidden

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

251 files changed

+1800
-3471
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: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
55
refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 5005be67cc4efb54adf6f68dbaa86d7f2ca14391
8+
refs/heads/try2: 2af088529fbb4baf2fa4e71735c27ffa9edefd3d
99
refs/heads/incoming: d9317a174e434d4c99fc1a37fd7dc0d2f5328d37
1010
refs/heads/dist-snap: 22efa39382d41b084fde1719df7ae8ce5697d8c9
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try2/AUTHORS.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ Brian J. Burg <[email protected]>
2626
Brian Leibig <[email protected]>
2727
Chris Double <[email protected]>
2828
Chris Peterson <[email protected]>
29-
Chris Pressey <[email protected]>
3029
Damian Gryski <[email protected]>
3130
Damien Grassart <[email protected]>
3231
Daniel Brooks <[email protected]>

branches/try2/Makefile.in

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,6 @@ HSREQ$(1)_H_$(3) = \
341341
$$(HLIB$(1)_H_$(3))/$$(CFG_RUSTLLVM) \
342342
$$(HCORELIB_DEFAULT$(1)_H_$(3)) \
343343
$$(HSTDLIB_DEFAULT$(1)_H_$(3)) \
344-
$$(HLIBSYNTAX_DEFAULT$(1)_H_$(3)) \
345344
$$(HLIBRUSTC_DEFAULT$(1)_H_$(3)) \
346345
$$(MKFILE_DEPS)
347346

@@ -351,31 +350,17 @@ TSREQ$(1)_T_$(2)_H_$(3) = \
351350
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUNTIME) \
352351
$$(TLIB$(1)_T_$(2)_H_$(3))/libmorestack.a
353352

354-
# Prerequisites for a working stageN compiler and libraries, for a specific target
353+
# Prerequisites for complete stageN targets
355354
SREQ$(1)_T_$(2)_H_$(3) = \
356355
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
357356
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_CORELIB) \
358-
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_STDLIB)
359-
360-
# Prerequisites for a working stageN compiler and libraries, for a specific target
361-
CSREQ$(1)_T_$(2)_H_$(3) = \
362-
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
363-
$$(HBIN$(1)_H_$(3))/fuzzer$$(X) \
364-
$$(HBIN$(1)_H_$(3))/cargo$$(X) \
365-
$$(HBIN$(1)_H_$(3))/rustdoc$$(X) \
366-
$$(HBIN$(1)_H_$(3))/rusti$$(X) \
367-
$$(HLIB$(1)_H_$(3))/$$(CFG_LIBFUZZER) \
368-
$$(HLIB$(1)_H_$(3))/$$(CFG_LIBCARGO) \
369-
$$(HLIB$(1)_H_$(3))/$$(CFG_LIBRUSTDOC) \
370-
$$(HLIB$(1)_H_$(3))/$$(CFG_LIBRUSTI) \
371-
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_CORELIB) \
372357
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_STDLIB) \
373358
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBSYNTAX) \
374359
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC) \
375360
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBFUZZER) \
376361
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBCARGO) \
377362
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTDOC) \
378-
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTI)
363+
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTI) \
379364

380365
ifeq ($(1),0)
381366
# Don't run the the stage0 compiler under valgrind - that ship has sailed
@@ -472,22 +457,19 @@ CFG_INFO := $(info cfg: *** compiler is in snapshot transition ***)
472457
CFG_INFO := $(info cfg: *** stage2 and later will not be built ***)
473458
CFG_INFO := $(info cfg:)
474459

475-
#XXX This is surely busted
476460
all: $(SREQ1$(CFG_HOST_TRIPLE)) $(GENERATED) docs
477461

478462
else
479463

480-
define ALL_TARGET_N
481-
all-target-$(1)-host-$(2): $$(CSREQ2_T_$(1)_H_$(2))
482-
endef
483-
484-
$(foreach target,$(CFG_TARGET_TRIPLES), \
485-
$(eval $(call ALL_TARGET_N,$(target),$(CFG_HOST_TRIPLE))))
486-
487-
ALL_TARGET_RULES = $(foreach target,$(CFG_TARGET_TRIPLES), \
488-
all-target-$(target)-host-$(CFG_HOST_TRIPLE))
464+
TSREQS := \
465+
$(foreach target,$(CFG_TARGET_TRIPLES), \
466+
$(SREQ3_T_$(target)_H_$(CFG_HOST_TRIPLE)))
467+
FUZZ := $(HBIN2_H_$(CFG_HOST_TRIPLE))/fuzzer$(X)
468+
CARGO := $(HBIN2_H_$(CFG_HOST_TRIPLE))/cargo$(X)
469+
RUSTDOC := $(HBIN2_H_$(CFG_HOST_TRIPLE))/rustdoc$(X)
470+
RUSTI := $(HBIN2_H_$(CFG_HOST_TRIPLE))/rusti$(X)
489471

490-
all: $(ALL_TARGET_RULES) $(GENERATED) docs
472+
all: rustc $(GENERATED) docs $(FUZZ) $(CARGO) $(RUSTDOC) $(RUSTI)
491473

492474
endif
493475

branches/try2/configure

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -432,15 +432,6 @@ then
432432
fi
433433
fi
434434

435-
# Force freebsd to build with clang; gcc doesn't like us there
436-
if [ $CFG_OSTYPE = unknown-freebsd ]
437-
then
438-
step_msg "on FreeBSD, forcing use of clang"
439-
CFG_ENABLE_CLANG=1
440-
putvar CFG_ENABLE_CLANG
441-
fi
442-
443-
444435
if [ -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ]
445436
then
446437
err "either clang or gcc is required"

branches/try2/doc/rust.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ view_item : extern_mod_decl | use_decl ;
761761
~~~~~~~~
762762

763763
A view item manages the namespace of a module.
764-
View items do not define new items, but rather, simply change other items' visibility.
764+
View items do not define new items, but rather, simply change other items' visibilit.
765765
There are several kinds of view item:
766766

767767
* [`extern mod` declarations](#extern-mod-declarations)

branches/try2/doc/tutorial.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ If you've fulfilled those prerequisites, something along these lines
100100
should work.
101101

102102
~~~~ {.notrust}
103-
$ curl -O http://dl.rust-lang.org/dist/rust-0.4.tar.gz
103+
$ wget http://dl.rust-lang.org/dist/rust-0.4.tar.gz
104104
$ tar -xzf rust-0.4.tar.gz
105105
$ cd rust-0.4
106106
$ ./configure
@@ -490,7 +490,7 @@ const MY_STRUCTY_PASSWORD: Password = Password { value: MY_PASSWORD };
490490
## Operators
491491

492492
Rust's set of operators contains very few surprises. Arithmetic is done with
493-
`*`, `/`, `%`, `+`, and `-` (multiply, divide, take remainder, add, subtract). `-` is
493+
`*`, `/`, `%`, `+`, and `-` (multiply, divide, remainder, plus, minus). `-` is
494494
also a unary prefix operator that negates numbers. As in C, the bit operators
495495
`>>`, `<<`, `&`, `|`, and `^` are also supported.
496496

@@ -608,7 +608,7 @@ a wildcard pattern that matches any single value. The asterisk (`*`)
608608
is a different wildcard that can match one or more fields in an `enum`
609609
variant.
610610

611-
The patterns in a match arm are followed by a fat arrow, `=>`, then an
611+
The patterns in an match arm are followed by a fat arrow, `=>`, then an
612612
expression to evaluate. Each case is separated by commas. It's often
613613
convenient to use a block expression for each case, in which case the
614614
commas are optional.
@@ -865,7 +865,7 @@ fn area(sh: Shape) -> float {
865865
}
866866
~~~~
867867

868-
You can write a lone `_` to ignore an individual field, and can
868+
You can write a lone `_` to ignore an individual fields, and can
869869
ignore all fields of a variant like: `Circle(*)`. As in their
870870
introduction form, nullary enum patterns are written without
871871
parentheses.
@@ -1096,7 +1096,7 @@ All pointer types can be dereferenced with the `*` unary operator.
10961096
Managed boxes are pointers to heap-allocated, garbage collected
10971097
memory. Applying the unary `@` operator to an expression creates a
10981098
managed box. The resulting box contains the result of the
1099-
expression. Copying a managed box, as happens during assignment, only
1099+
expression. Copying a shared box, as happens during assignment, only
11001100
copies a pointer, never the contents of the box.
11011101

11021102
~~~~
@@ -1145,7 +1145,7 @@ Managed boxes never cross task boundaries.
11451145
In contrast with managed boxes, owned boxes have a single owning
11461146
memory slot and thus two owned boxes may not refer to the same
11471147
memory. All owned boxes across all tasks are allocated on a single
1148-
_exchange heap_, where their uniquely-owned nature allows tasks to
1148+
_exchange heap_, where their uniquely owned nature allows tasks to
11491149
exchange them efficiently.
11501150

11511151
Because owned boxes are uniquely owned, copying them requires allocating
@@ -1158,7 +1158,7 @@ let x = ~10;
11581158
let y = x; // error: copying a non-implicitly copyable type
11591159
~~~~
11601160

1161-
If you really want to copy an owned box you must say so explicitly.
1161+
If you really want to copy a unique box you must say so explicitly.
11621162

11631163
~~~~
11641164
let x = ~10;
@@ -1190,7 +1190,7 @@ become the sole owner of the box.
11901190

11911191
Rust borrowed pointers are a general purpose reference/pointer type,
11921192
similar to the C++ reference type, but guaranteed to point to valid
1193-
memory. In contrast with owned pointers, where the holder of an owned
1193+
memory. In contrast with owned pointers, where the holder of a unique
11941194
pointer is the owner of the pointed-to memory, borrowed pointers never
11951195
imply ownership. Pointers may be borrowed from any type, in which case
11961196
the pointer is guaranteed not to outlive the value it points to.
@@ -1210,14 +1210,14 @@ contains a point, but allocated in a different location:
12101210
~~~
12111211
# struct Point { x: float, y: float }
12121212
let on_the_stack : Point = Point {x: 3.0, y: 4.0};
1213-
let managed_box : @Point = @Point {x: 5.0, y: 1.0};
1214-
let owned_box : ~Point = ~Point {x: 7.0, y: 9.0};
1213+
let shared_box : @Point = @Point {x: 5.0, y: 1.0};
1214+
let unique_box : ~Point = ~Point {x: 7.0, y: 9.0};
12151215
~~~
12161216
12171217
Suppose we wanted to write a procedure that computed the distance
12181218
between any two points, no matter where they were stored. For example,
12191219
we might like to compute the distance between `on_the_stack` and
1220-
`managed_box`, or between `managed_box` and `owned_box`. One option is
1220+
`shared_box`, or between `shared_box` and `unique_box`. One option is
12211221
to define a function that takes two arguments of type point—that is,
12221222
it takes the points by value. But this will cause the points to be
12231223
copied when we call the function. For points, this is probably not so
@@ -1241,11 +1241,11 @@ Now we can call `compute_distance()` in various ways:
12411241
~~~
12421242
# struct Point{ x: float, y: float };
12431243
# let on_the_stack : Point = Point {x: 3.0, y: 4.0};
1244-
# let managed_box : @Point = @Point {x: 5.0, y: 1.0};
1245-
# let owned_box : ~Point = ~Point {x: 7.0, y: 9.0};
1244+
# let shared_box : @Point = @Point {x: 5.0, y: 1.0};
1245+
# let unique_box : ~Point = ~Point {x: 7.0, y: 9.0};
12461246
# fn compute_distance(p1: &Point, p2: &Point) -> float { 0f }
1247-
compute_distance(&on_the_stack, managed_box);
1248-
compute_distance(managed_box, owned_box);
1247+
compute_distance(&on_the_stack, shared_box);
1248+
compute_distance(shared_box, unique_box);
12491249
~~~
12501250
12511251
Here the `&` operator is used to take the address of the variable
@@ -1255,11 +1255,11 @@ value. We also call this _borrowing_ the local variable
12551255
`on_the_stack`, because we are created an alias: that is, another
12561256
route to the same data.
12571257
1258-
In the case of the boxes `managed_box` and `owned_box`, however, no
1258+
In the case of the boxes `shared_box` and `unique_box`, however, no
12591259
explicit action is necessary. The compiler will automatically convert
12601260
a box like `@point` or `~point` to a borrowed pointer like
12611261
`&point`. This is another form of borrowing; in this case, the
1262-
contents of the managed/owned box is being lent out.
1262+
contents of the shared/unique box is being lent out.
12631263
12641264
Whenever a value is borrowed, there are some limitations on what you
12651265
can do with the original. For example, if the contents of a variable

branches/try2/mk/install.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ PTR$(1)$(2) = $$(PREFIX_LIB)/rustc/$(1)
3333
PTB$(1)$(2) = $$(PTR$(1)$(2))/bin
3434
PTL$(1)$(2) = $$(PTR$(1)$(2))/$(CFG_LIBDIR)
3535

36-
install-target-$(1)-host-$(2): $$(CSREQ$$(ISTAGE)_T_$(1)_H_$(2))
36+
install-target-$(1)-host-$(2): $$(SREQ$$(ISTAGE)_T_$(1)_H_$(2))
3737
$$(Q)mkdir -p $$(PTL$(1)$(2))
3838
$$(Q)$$(call INSTALL,$$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(CFG_RUNTIME))
3939
$$(Q)$$(call INSTALL_LIB, \
@@ -74,7 +74,7 @@ PHB = $(PREFIX_BIN)
7474
# Shorthand for the prefix bin directory
7575
PHL = $(PREFIX_LIB)
7676

77-
install-host: $(CSREQ$(ISTAGE)_T_$(CFG_HOST_TRIPLE)_H_$(CFG_HOST_TRIPLE))
77+
install-host: $(SREQ$(ISTAGE)_T_$(CFG_HOST_TRIPLE)_H_$(CFG_HOST_TRIPLE))
7878
$(Q)mkdir -p $(PREFIX_BIN)
7979
$(Q)mkdir -p $(PREFIX_LIB)
8080
$(Q)mkdir -p $(PREFIX_ROOT)/share/man/man1

branches/try2/mk/tests.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,8 +352,7 @@ $(3)/test/rustctest.stage$(1)-$(2)$$(X): \
352352
$$(COMPILER_CRATE) \
353353
$$(COMPILER_INPUTS) \
354354
$$(SREQ$(1)_T_$(2)_H_$(3)) \
355-
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUSTLLVM) \
356-
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBSYNTAX)
355+
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUSTLLVM)
357356
@$$(call E, compile_and_link: $$@)
358357
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
359358

branches/try2/src/libcore/core.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,23 +54,23 @@ pub use coreops::ops::{Shl, Shr, Index};
5454
// warn-and-below.
5555

5656
/// The error log level
57-
pub const error : u32 = 1_u32;
57+
pub const error : u32 = 0_u32;
5858
/// The warning log level
59-
pub const warn : u32 = 2_u32;
59+
pub const warn : u32 = 1_u32;
6060
/// The info log level
61-
pub const info : u32 = 3_u32;
61+
pub const info : u32 = 2_u32;
6262
/// The debug log level
63-
pub const debug : u32 = 4_u32;
63+
pub const debug : u32 = 3_u32;
6464

6565
// A curious inner-module that's not exported that contains the binding
6666
// 'core' so that macro-expanded references to core::error and such
6767
// can be resolved within libcore.
6868
#[doc(hidden)] // FIXME #3538
6969
mod core {
70-
pub const error : u32 = 1_u32;
71-
pub const warn : u32 = 2_u32;
72-
pub const info : u32 = 3_u32;
73-
pub const debug : u32 = 4_u32;
70+
pub const error : u32 = 0_u32;
71+
pub const warn : u32 = 1_u32;
72+
pub const info : u32 = 2_u32;
73+
pub const debug : u32 = 3_u32;
7474
}
7575

7676
// Similar to above. Some magic to make core testable.

branches/try2/src/libcore/float.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616

1717
use m_float = f64;
1818

19-
pub use f64::{add, sub, mul, div, rem, lt, le, eq, ne, ge, gt};
20-
pub use f64::logarithm;
21-
pub use f64::{acos, asin, atan2, cbrt, ceil, copysign, cosh, floor};
22-
pub use f64::{erf, erfc, exp, expm1, exp2, abs_sub};
23-
pub use f64::{mul_add, fmax, fmin, nextafter, frexp, hypot, ldexp};
24-
pub use f64::{lgamma, ln, log_radix, ln1p, log10, log2, ilog_radix};
25-
pub use f64::{modf, pow, round, sinh, tanh, tgamma, trunc};
26-
pub use f64::signbit;
27-
pub use f64::{j0, j1, jn, y0, y1, yn};
19+
use f64::{add, sub, mul, div, rem, lt, le, eq, ne, ge, gt};
20+
use f64::logarithm;
21+
use f64::{acos, asin, atan2, cbrt, ceil, copysign, cosh, floor};
22+
use f64::{erf, erfc, exp, expm1, exp2, abs_sub};
23+
use f64::{mul_add, fmax, fmin, nextafter, frexp, hypot, ldexp};
24+
use f64::{lgamma, ln, log_radix, ln1p, log10, log2, ilog_radix};
25+
use f64::{modf, pow, round, sinh, tanh, tgamma, trunc};
26+
use f64::signbit;
27+
use f64::{j0, j1, jn, y0, y1, yn};
2828
use cmp::{Eq, Ord};
2929
use num::from_int;
3030

branches/try2/src/libcore/int-template.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,9 @@ pub pure fn to_str_bytes<U>(n: T, radix: uint, f: fn(v: &[u8]) -> U) -> U {
155155
/// Convert to a string
156156
pub pure fn str(i: T) -> ~str { return to_str(i, 10u); }
157157

158+
// FIXME: Has alignment issues on windows and 32-bit linux (#2609)
158159
#[test]
160+
#[ignore]
159161
fn test_from_str() {
160162
assert from_str(~"0") == Some(0 as T);
161163
assert from_str(~"3") == Some(3 as T);
@@ -173,7 +175,9 @@ fn test_from_str() {
173175
assert from_str(~"x").is_none();
174176
}
175177

178+
// FIXME: Has alignment issues on windows and 32-bit linux (#2609)
176179
#[test]
180+
#[ignore]
177181
fn test_parse_bytes() {
178182
use str::to_bytes;
179183
assert parse_bytes(to_bytes(~"123"), 10u) == Some(123 as T);

branches/try2/src/libcore/result.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,11 @@ pub pure fn to_either<T: Copy, U: Copy>(res: &Result<U, T>)
103103
* ok(parse_bytes(buf))
104104
* }
105105
*/
106-
pub fn chain<T, U, V>(res: Result<T, V>, op: fn(t: T)
106+
pub fn chain<T, U: Copy, V: Copy>(res: Result<T, V>, op: fn(t: T)
107107
-> Result<U, V>) -> Result<U, V> {
108108
match move res {
109109
Ok(move t) => op(move t),
110-
Err(move e) => Err(move e)
110+
Err(move e) => Err(e)
111111
}
112112
}
113113

@@ -119,13 +119,13 @@ pub fn chain<T, U, V>(res: Result<T, V>, op: fn(t: T)
119119
* immediately returned. This function can be used to pass through a
120120
* successful result while handling an error.
121121
*/
122-
pub fn chain_err<T, U, V>(
122+
pub fn chain_err<T: Copy, U: Copy, V: Copy>(
123123
res: Result<T, V>,
124124
op: fn(t: V) -> Result<T, U>)
125125
-> Result<T, U> {
126126
match move res {
127-
Ok(move t) => Ok(move t),
128-
Err(move v) => op(move v)
127+
Ok(move t) => Ok(t),
128+
Err(move v) => op(v)
129129
}
130130
}
131131

branches/try2/src/libcore/uint-template.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ pub fn test_to_str() {
221221
}
222222

223223
#[test]
224+
#[ignore]
224225
pub fn test_from_str() {
225226
assert from_str(~"0") == Some(0u as T);
226227
assert from_str(~"3") == Some(3u as T);
@@ -234,6 +235,7 @@ pub fn test_from_str() {
234235
}
235236

236237
#[test]
238+
#[ignore]
237239
pub fn test_parse_bytes() {
238240
use str::to_bytes;
239241
assert parse_bytes(to_bytes(~"123"), 10u) == Some(123u as T);

0 commit comments

Comments
 (0)