Skip to content

Commit 5964a0c

Browse files
committed
---
yaml --- r: 22140 b: refs/heads/snap-stage3 c: b3f418c h: refs/heads/master v: v3
1 parent 4fd0e24 commit 5964a0c

Some content is hidden

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

110 files changed

+1611
-1817
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: e430a699f2c60890d9b86069fd0c68a70ece7120
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: bc9efaad9c978f71bd7ac2c91efbc957e25d43fb
4+
refs/heads/snap-stage3: b3f418c10ed88163f6d1c6774b51eb69def521f8
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/AUTHORS.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ Ben Striegel <[email protected]>
1717
Benjamin Herr <[email protected]>
1818
Benjamin Jackman <[email protected]>
1919
Benjamin Kircher <[email protected]>
20-
Benjamin Peterson <[email protected]>
2120
Brendan Eich <[email protected]>
2221
Brian Anderson <[email protected]>
2322
Brian J. Burg <[email protected]>

branches/snap-stage3/doc/tutorial.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ literals and most enum variants.
616616

617617
`while` produces a loop that runs as long as its given condition
618618
(which must have type `bool`) evaluates to true. Inside a loop, the
619-
keyword `break` can be used to abort the loop, and `loop` can be used
619+
keyword `break` can be used to abort the loop, and `again` can be used
620620
to abort the current iteration and continue with the next.
621621

622622
~~~~
@@ -1564,7 +1564,7 @@ Empty argument lists can be omitted from `do` expressions.
15641564
15651565
Most iteration in Rust is done with `for` loops. Like `do`,
15661566
`for` is a nice syntax for doing control flow with closures.
1567-
Additionally, within a `for` loop, `break`, `loop`, and `return`
1567+
Additionally, within a `for` loop, `break`, `again`, and `return`
15681568
work just as they do with `while` and `loop`.
15691569
15701570
Consider again our `each` function, this time improved to
@@ -1599,7 +1599,7 @@ With `for`, functions like `each` can be treated more
15991599
like builtin looping structures. When calling `each`
16001600
in a `for` loop, instead of returning `false` to break
16011601
out of the loop, you just write `break`. To skip ahead
1602-
to the next iteration, write `loop`.
1602+
to the next iteration, write `again`.
16031603
16041604
~~~~
16051605
# use each = vec::each;

branches/snap-stage3/src/compiletest/compiletest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ fn parse_config(args: ~[~str]) -> config {
5858
} else { option::None },
5959
logfile: option::map(&getopts::opt_maybe_str(matches,
6060
~"logfile"),
61-
|s| Path(*s)),
61+
|s| Path(s)),
6262
runtool: getopts::opt_maybe_str(matches, ~"runtool"),
6363
rustcflags: getopts::opt_maybe_str(matches, ~"rustcflags"),
6464
jit: getopts::opt_present(matches, ~"jit"),

branches/snap-stage3/src/compiletest/header.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ fn load_props(testfile: &Path) -> test_props {
4141
}
4242

4343
do parse_aux_build(ln).iter |ab| {
44-
aux_builds.push(*ab);
44+
aux_builds.push(ab);
4545
}
4646

4747
do parse_exec_env(ln).iter |ee| {
48-
exec_env.push(*ee);
48+
exec_env.push(ee);
4949
}
5050
};
5151
return {
@@ -103,7 +103,7 @@ fn parse_compile_flags(line: ~str) -> Option<~str> {
103103
fn parse_exec_env(line: ~str) -> Option<(~str, ~str)> {
104104
do parse_name_value_directive(line, ~"exec-env").map |nv| {
105105
// nv is either FOO or FOO=BAR
106-
let strs = str::splitn_char(*nv, '=', 1u);
106+
let strs = str::splitn_char(nv, '=', 1u);
107107
match strs.len() {
108108
1u => (strs[0], ~""),
109109
2u => (strs[0], strs[1]),

branches/snap-stage3/src/libcore/cast.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
33
#[abi = "rust-intrinsic"]
44
extern mod rusti {
5+
#[legacy_exports];
56
fn forget<T>(-x: T);
67
fn reinterpret_cast<T, U>(e: T) -> U;
78
}

branches/snap-stage3/src/libcore/char.rs

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ use cmp::Eq;
3939
Cn Unassigned a reserved unassigned code point or a noncharacter
4040
*/
4141

42+
export is_alphabetic,
43+
is_XID_start, is_XID_continue,
44+
is_lowercase, is_uppercase,
45+
is_whitespace, is_alphanumeric,
46+
is_ascii, is_digit,
47+
to_digit, cmp,
48+
escape_default, escape_unicode;
49+
4250
pub use is_alphabetic = unicode::derived_property::Alphabetic;
4351
pub use is_XID_start = unicode::derived_property::XID_Start;
4452
pub use is_XID_continue = unicode::derived_property::XID_Continue;
@@ -48,15 +56,15 @@ pub use is_XID_continue = unicode::derived_property::XID_Continue;
4856
* Indicates whether a character is in lower case, defined
4957
* in terms of the Unicode General Category 'Ll'
5058
*/
51-
pub pure fn is_lowercase(c: char) -> bool {
59+
pure fn is_lowercase(c: char) -> bool {
5260
return unicode::general_category::Ll(c);
5361
}
5462

5563
/**
5664
* Indicates whether a character is in upper case, defined
5765
* in terms of the Unicode General Category 'Lu'.
5866
*/
59-
pub pure fn is_uppercase(c: char) -> bool {
67+
pure fn is_uppercase(c: char) -> bool {
6068
return unicode::general_category::Lu(c);
6169
}
6270

@@ -65,7 +73,7 @@ pub pure fn is_uppercase(c: char) -> bool {
6573
* terms of the Unicode General Categories 'Zs', 'Zl', 'Zp'
6674
* additional 'Cc'-category control codes in the range [0x09, 0x0d]
6775
*/
68-
pub pure fn is_whitespace(c: char) -> bool {
76+
pure fn is_whitespace(c: char) -> bool {
6977
return ('\x09' <= c && c <= '\x0d')
7078
|| unicode::general_category::Zs(c)
7179
|| unicode::general_category::Zl(c)
@@ -77,20 +85,20 @@ pub pure fn is_whitespace(c: char) -> bool {
7785
* defined in terms of the Unicode General Categories 'Nd', 'Nl', 'No'
7886
* and the Derived Core Property 'Alphabetic'.
7987
*/
80-
pub pure fn is_alphanumeric(c: char) -> bool {
88+
pure fn is_alphanumeric(c: char) -> bool {
8189
return unicode::derived_property::Alphabetic(c) ||
8290
unicode::general_category::Nd(c) ||
8391
unicode::general_category::Nl(c) ||
8492
unicode::general_category::No(c);
8593
}
8694

8795
/// Indicates whether the character is an ASCII character
88-
pub pure fn is_ascii(c: char) -> bool {
96+
pure fn is_ascii(c: char) -> bool {
8997
c - ('\x7F' & c) == '\x00'
9098
}
9199

92100
/// Indicates whether the character is numeric (Nd, Nl, or No)
93-
pub pure fn is_digit(c: char) -> bool {
101+
pure fn is_digit(c: char) -> bool {
94102
return unicode::general_category::Nd(c) ||
95103
unicode::general_category::Nl(c) ||
96104
unicode::general_category::No(c);
@@ -106,7 +114,7 @@ pub pure fn is_digit(c: char) -> bool {
106114
* 'b' or 'B', 11, etc. Returns none if the char does not
107115
* refer to a digit in the given radix.
108116
*/
109-
pub pure fn to_digit(c: char, radix: uint) -> Option<uint> {
117+
pure fn to_digit(c: char, radix: uint) -> Option<uint> {
110118
let val = match c {
111119
'0' .. '9' => c as uint - ('0' as uint),
112120
'a' .. 'z' => c as uint + 10u - ('a' as uint),
@@ -126,7 +134,7 @@ pub pure fn to_digit(c: char, radix: uint) -> Option<uint> {
126134
* - chars in [0x100,0xffff] get 4-digit escapes: `\\uNNNN`
127135
* - chars above 0x10000 get 8-digit escapes: `\\UNNNNNNNN`
128136
*/
129-
pub fn escape_unicode(c: char) -> ~str {
137+
fn escape_unicode(c: char) -> ~str {
130138
let s = u32::to_str(c as u32, 16u);
131139
let (c, pad) = (if c <= '\xff' { ('x', 2u) }
132140
else if c <= '\uffff' { ('u', 4u) }
@@ -151,7 +159,7 @@ pub fn escape_unicode(c: char) -> ~str {
151159
* - Any other chars in the range [0x20,0x7e] are not escaped.
152160
* - Any other chars are given hex unicode escapes; see `escape_unicode`.
153161
*/
154-
pub fn escape_default(c: char) -> ~str {
162+
fn escape_default(c: char) -> ~str {
155163
match c {
156164
'\t' => ~"\\t",
157165
'\r' => ~"\\r",
@@ -171,7 +179,7 @@ pub fn escape_default(c: char) -> ~str {
171179
*
172180
* -1 if a < b, 0 if a == b, +1 if a > b
173181
*/
174-
pub pure fn cmp(a: char, b: char) -> int {
182+
pure fn cmp(a: char, b: char) -> int {
175183
return if b > a { -1 }
176184
else if b < a { 1 }
177185
else { 0 }

branches/snap-stage3/src/libcore/core.rc

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ Implicitly, all crates behave as if they included the following prologue:
3737
#[no_core];
3838

3939
#[legacy_modes];
40-
#[legacy_exports];
4140

4241
#[warn(vecs_implicitly_copyable)];
4342
#[deny(non_camel_case_types)];
@@ -196,8 +195,11 @@ mod u64 {
196195
}
197196

198197

198+
#[legacy_exports]
199199
mod box;
200+
#[legacy_exports]
200201
mod char;
202+
#[legacy_exports]
201203
mod float;
202204
#[legacy_exports]
203205
mod f32;
@@ -305,17 +307,29 @@ mod pipes;
305307
mod gc;
306308
#[legacy_exports]
307309
mod io;
310+
#[legacy_exports]
308311
mod libc;
312+
#[legacy_exports]
309313
mod os;
314+
#[legacy_exports]
310315
mod path;
316+
#[legacy_exports]
311317
mod rand;
318+
#[legacy_exports]
312319
mod run;
320+
#[legacy_exports]
313321
mod sys;
322+
#[legacy_exports]
314323
mod cast;
324+
#[legacy_exports]
315325
mod mutable;
326+
#[legacy_exports]
316327
mod flate;
328+
#[legacy_exports]
317329
mod repr;
330+
#[legacy_exports]
318331
mod cleanup;
332+
#[legacy_exports]
319333
mod reflect;
320334

321335
// Modules supporting compiler-generated code
@@ -331,7 +345,9 @@ mod rt;
331345

332346
// For internal use, not exported
333347

348+
#[legacy_exports]
334349
mod unicode;
350+
#[legacy_exports]
335351
mod private;
336352
mod cmath;
337353
mod stackwalk;

branches/snap-stage3/src/libcore/core.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
// Export various ubiquitous types, constructors, methods.
44

5+
#[legacy_exports];
6+
57
use option::{Some, None};
68
use Option = option::Option;
79
use result::{Result, Ok, Err};

branches/snap-stage3/src/libcore/dlist.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,13 +275,13 @@ impl<T> DList<T> {
275275
/// Remove a node from the head of the list. O(1).
276276
fn pop_n() -> Option<DListNode<T>> {
277277
let hd = self.peek_n();
278-
hd.map(|nobe| self.unlink(*nobe));
278+
hd.map(|nobe| self.unlink(nobe));
279279
hd
280280
}
281281
/// Remove a node from the tail of the list. O(1).
282282
fn pop_tail_n() -> Option<DListNode<T>> {
283283
let tl = self.peek_tail_n();
284-
tl.map(|nobe| self.unlink(*nobe));
284+
tl.map(|nobe| self.unlink(nobe));
285285
tl
286286
}
287287
/// Get the node at the list's head. O(1).

branches/snap-stage3/src/libcore/flate.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ Simple compression
1111
use libc::{c_void, size_t, c_int};
1212

1313
extern mod rustrt {
14+
#[legacy_exports];
15+
1416
fn tdefl_compress_mem_to_heap(psrc_buf: *const c_void,
1517
src_buf_len: size_t,
1618
pout_len: *size_t,
@@ -27,7 +29,7 @@ const lz_fast : c_int = 0x1; // LZ with only one probe
2729
const lz_norm : c_int = 0x80; // LZ with 128 probes, "normal"
2830
const lz_best : c_int = 0xfff; // LZ with 4095 probes, "best"
2931

30-
pub fn deflate_bytes(bytes: &[const u8]) -> ~[u8] {
32+
fn deflate_bytes(bytes: &[const u8]) -> ~[u8] {
3133
do vec::as_const_buf(bytes) |b, len| {
3234
unsafe {
3335
let mut outsz : size_t = 0;
@@ -45,7 +47,7 @@ pub fn deflate_bytes(bytes: &[const u8]) -> ~[u8] {
4547
}
4648
}
4749

48-
pub fn inflate_bytes(bytes: &[const u8]) -> ~[u8] {
50+
fn inflate_bytes(bytes: &[const u8]) -> ~[u8] {
4951
do vec::as_const_buf(bytes) |b, len| {
5052
unsafe {
5153
let mut outsz : size_t = 0;

branches/snap-stage3/src/libcore/float.rs

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,26 @@
77
// Even though this module exports everything defined in it,
88
// because it contains re-exports, we also have to explicitly
99
// export locally defined things. That's a bit annoying.
10-
10+
export to_str_common, to_str_exact, to_str, from_str;
11+
export add, sub, mul, div, rem, lt, le, eq, ne, ge, gt;
12+
export is_positive, is_negative, is_nonpositive, is_nonnegative;
13+
export is_zero, is_infinite, is_finite;
14+
export NaN, is_NaN, infinity, neg_infinity;
15+
export consts;
16+
export logarithm;
17+
export acos, asin, atan, atan2, cbrt, ceil, copysign, cos, cosh, floor;
18+
export erf, erfc, exp, expm1, exp2, abs, abs_sub;
19+
export mul_add, fmax, fmin, nextafter, frexp, hypot, ldexp;
20+
export lgamma, ln, log_radix, ln1p, log10, log2, ilog_radix;
21+
export modf, pow, round, sin, sinh, sqrt, tan, tanh, tgamma, trunc;
22+
export signbit;
23+
export pow_with_uint;
24+
25+
export num;
1126

1227
// export when m_float == c_double
1328

29+
export j0, j1, jn, y0, y1, yn;
1430

1531
// PORT this must match in width according to architecture
1632

@@ -28,11 +44,11 @@ use f64::{j0, j1, jn, y0, y1, yn};
2844
use cmp::{Eq, Ord};
2945
use num::from_int;
3046

31-
pub const NaN: float = 0.0/0.0;
47+
const NaN: float = 0.0/0.0;
3248

33-
pub const infinity: float = 1.0/0.0;
49+
const infinity: float = 1.0/0.0;
3450

35-
pub const neg_infinity: float = -1.0/0.0;
51+
const neg_infinity: float = -1.0/0.0;
3652

3753
/* Module: consts */
3854
pub mod consts {
@@ -91,7 +107,7 @@ pub mod consts {
91107
* * digits - The number of significant digits
92108
* * exact - Whether to enforce the exact number of significant digits
93109
*/
94-
pub fn to_str_common(num: float, digits: uint, exact: bool) -> ~str {
110+
fn to_str_common(num: float, digits: uint, exact: bool) -> ~str {
95111
if is_NaN(num) { return ~"NaN"; }
96112
if num == infinity { return ~"inf"; }
97113
if num == neg_infinity { return ~"-inf"; }
@@ -398,22 +414,22 @@ pub pure fn cos(x: float) -> float { f64::cos(x as f64) as float }
398414
pub pure fn tan(x: float) -> float { f64::tan(x as f64) as float }
399415

400416
impl float : Eq {
401-
pub pure fn eq(other: &float) -> bool { self == (*other) }
402-
pub pure fn ne(other: &float) -> bool { self != (*other) }
417+
pure fn eq(other: &float) -> bool { self == (*other) }
418+
pure fn ne(other: &float) -> bool { self != (*other) }
403419
}
404420

405421
impl float : Ord {
406-
pub pure fn lt(other: &float) -> bool { self < (*other) }
407-
pub pure fn le(other: &float) -> bool { self <= (*other) }
408-
pub pure fn ge(other: &float) -> bool { self >= (*other) }
409-
pub pure fn gt(other: &float) -> bool { self > (*other) }
422+
pure fn lt(other: &float) -> bool { self < (*other) }
423+
pure fn le(other: &float) -> bool { self <= (*other) }
424+
pure fn ge(other: &float) -> bool { self >= (*other) }
425+
pure fn gt(other: &float) -> bool { self > (*other) }
410426
}
411427

412428
impl float: num::Num {
413-
pub pure fn add(other: &float) -> float { return self + *other; }
414-
pub pure fn sub(other: &float) -> float { return self - *other; }
415-
pub pure fn mul(other: &float) -> float { return self * *other; }
416-
pub pure fn div(other: &float) -> float { return self / *other; }
429+
pure fn add(other: &float) -> float { return self + *other; }
430+
pure fn sub(other: &float) -> float { return self - *other; }
431+
pure fn mul(other: &float) -> float { return self * *other; }
432+
pure fn div(other: &float) -> float { return self / *other; }
417433
pure fn modulo(other: &float) -> float { return self % *other; }
418434
pure fn neg() -> float { return -self; }
419435

branches/snap-stage3/src/libcore/io.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -697,10 +697,8 @@ impl BytesWriter: Writer {
697697
vec::reserve(&mut buf, count);
698698
unsafe { vec::raw::set_len(buf, count); }
699699
700-
{
701-
let view = vec::mut_view(buf, self.pos, count);
702-
vec::bytes::memcpy(view, v, v_len);
703-
}
700+
let view = vec::mut_view(buf, self.pos, count);
701+
vec::bytes::memcpy(view, v, v_len);
704702
705703
self.pos += v_len;
706704

0 commit comments

Comments
 (0)