Skip to content

Commit 52e0a18

Browse files
committed
---
yaml --- r: 39827 b: refs/heads/incoming c: 6441d61 h: refs/heads/master i: 39825: 5b53780 39823: 33e755e v: v3
1 parent 4e1caab commit 52e0a18

25 files changed

+18
-394
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: 3d5418789064fdb463e872a4e651af1c628a3650
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278
9-
refs/heads/incoming: d5dc66ad3181ab4fa5fc3ccd806b25f3e5ddbe8f
9+
refs/heads/incoming: 6441d619ba8984f469ecbd5e46358e982366b678
1010
refs/heads/dist-snap: 22efa39382d41b084fde1719df7ae8ce5697d8c9
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/doc/tutorial-macros.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ to transcribe into the macro expansion; its type need not be repeated.
115115
The right-hand side must be enclosed by delimiters, which are ignored by the
116116
transcriber (therefore `() => ((1,2,3))` is a macro that expands to a tuple
117117
expression, `() => (let $x=$val)` is a macro that expands to a statement, and
118-
`() => (1,2,3)` is a macro that expands to a syntax error).
118+
`() => (1,2,3)` is a macro that expands to a syntax errror).
119119

120120
Except for permissibility of `$name` (and `$(...)*`, discussed below), the
121121
right-hand side of a macro definition is ordinary Rust syntax. In particular,

branches/incoming/src/libcore/char.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ pub use is_XID_continue = unicode::derived_property::XID_Continue;
6464
* Indicates whether a character is in lower case, defined
6565
* in terms of the Unicode General Category 'Ll'
6666
*/
67-
#[inline(always)]
6867
pub pure fn is_lowercase(c: char) -> bool {
6968
return unicode::general_category::Ll(c);
7069
}
@@ -73,7 +72,6 @@ pub pure fn is_lowercase(c: char) -> bool {
7372
* Indicates whether a character is in upper case, defined
7473
* in terms of the Unicode General Category 'Lu'.
7574
*/
76-
#[inline(always)]
7775
pub pure fn is_uppercase(c: char) -> bool {
7876
return unicode::general_category::Lu(c);
7977
}
@@ -83,7 +81,6 @@ pub pure fn is_uppercase(c: char) -> bool {
8381
* terms of the Unicode General Categories 'Zs', 'Zl', 'Zp'
8482
* additional 'Cc'-category control codes in the range [0x09, 0x0d]
8583
*/
86-
#[inline(always)]
8784
pub pure fn is_whitespace(c: char) -> bool {
8885
return ('\x09' <= c && c <= '\x0d')
8986
|| unicode::general_category::Zs(c)
@@ -96,7 +93,6 @@ pub pure fn is_whitespace(c: char) -> bool {
9693
* defined in terms of the Unicode General Categories 'Nd', 'Nl', 'No'
9794
* and the Derived Core Property 'Alphabetic'.
9895
*/
99-
#[inline(always)]
10096
pub pure fn is_alphanumeric(c: char) -> bool {
10197
return unicode::derived_property::Alphabetic(c) ||
10298
unicode::general_category::Nd(c) ||
@@ -105,13 +101,11 @@ pub pure fn is_alphanumeric(c: char) -> bool {
105101
}
106102

107103
/// Indicates whether the character is an ASCII character
108-
#[inline(always)]
109104
pub pure fn is_ascii(c: char) -> bool {
110105
c - ('\x7F' & c) == '\x00'
111106
}
112107

113108
/// Indicates whether the character is numeric (Nd, Nl, or No)
114-
#[inline(always)]
115109
pub pure fn is_digit(c: char) -> bool {
116110
return unicode::general_category::Nd(c) ||
117111
unicode::general_category::Nl(c) ||
@@ -128,7 +122,6 @@ pub pure fn is_digit(c: char) -> bool {
128122
* 'b' or 'B', 11, etc. Returns none if the char does not
129123
* refer to a digit in the given radix.
130124
*/
131-
#[inline]
132125
pub pure fn to_digit(c: char, radix: uint) -> Option<uint> {
133126
let val = match c {
134127
'0' .. '9' => c as uint - ('0' as uint),
@@ -197,7 +190,6 @@ pub pure fn escape_default(c: char) -> ~str {
197190
*
198191
* -1 if a < b, 0 if a == b, +1 if a > b
199192
*/
200-
#[inline(always)]
201193
pub pure fn cmp(a: char, b: char) -> int {
202194
return if b > a { -1 }
203195
else if b < a { 1 }

branches/incoming/src/libcore/clone.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,5 @@ pub trait Clone {
1616
}
1717

1818
impl (): Clone {
19-
#[inline(always)]
2019
fn clone(&self) -> () { () }
2120
}

branches/incoming/src/libcore/cmp.rs

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@ and `Eq` to overload the `==` and `!=` operators.
3030
*
3131
* Eventually this may be simplified to only require
3232
* an `eq` method, with the other generated from
33-
* a default implementation. However it should
34-
* remain possible to implement `ne` separately, for
35-
* compatibility with floating-point NaN semantics
36-
* (cf. IEEE 754-2008 section 5.11).
33+
* a default implementation.
3734
*/
3835
#[lang="eq"]
3936
pub trait Eq {
@@ -46,10 +43,7 @@ pub trait Eq {
4643
*
4744
* Eventually this may be simplified to only require
4845
* an `le` method, with the others generated from
49-
* default implementations. However it should remain
50-
* possible to implement the others separately, for
51-
* compatibility with floating-point NaN semantics
52-
* (cf. IEEE 754-2008 section 5.11).
46+
* default implementations.
5347
*/
5448
#[lang="ord"]
5549
pub trait Ord {
@@ -59,32 +53,26 @@ pub trait Ord {
5953
pure fn gt(&self, other: &self) -> bool;
6054
}
6155

62-
#[inline(always)]
6356
pub pure fn lt<T: Ord>(v1: &T, v2: &T) -> bool {
6457
(*v1).lt(v2)
6558
}
6659

67-
#[inline(always)]
68-
pub pure fn le<T: Ord>(v1: &T, v2: &T) -> bool {
69-
(*v1).le(v2)
60+
pub pure fn le<T: Ord Eq>(v1: &T, v2: &T) -> bool {
61+
(*v1).lt(v2) || (*v1).eq(v2)
7062
}
7163

72-
#[inline(always)]
7364
pub pure fn eq<T: Eq>(v1: &T, v2: &T) -> bool {
7465
(*v1).eq(v2)
7566
}
7667

77-
#[inline(always)]
7868
pub pure fn ne<T: Eq>(v1: &T, v2: &T) -> bool {
7969
(*v1).ne(v2)
8070
}
8171

82-
#[inline(always)]
8372
pub pure fn ge<T: Ord>(v1: &T, v2: &T) -> bool {
8473
(*v1).ge(v2)
8574
}
8675

87-
#[inline(always)]
8876
pub pure fn gt<T: Ord>(v1: &T, v2: &T) -> bool {
8977
(*v1).gt(v2)
9078
}

branches/incoming/src/libcore/either.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ pub enum Either<T, U> {
2828
Right(U)
2929
}
3030

31-
#[inline(always)]
3231
pub fn either<T, U, V>(f_left: fn(&T) -> V,
3332
f_right: fn(&U) -> V, value: &Either<T, U>) -> V {
3433
/*!
@@ -91,7 +90,6 @@ pub fn partition<T, U>(eithers: ~[Either<T, U>])
9190
return (move lefts, move rights);
9291
}
9392

94-
#[inline(always)]
9593
pub pure fn flip<T, U>(eith: Either<T, U>) -> Either<U, T> {
9694
//! Flips between left and right of a given either
9795
@@ -101,7 +99,6 @@ pub pure fn flip<T, U>(eith: Either<T, U>) -> Either<U, T> {
10199
}
102100
}
103101

104-
#[inline(always)]
105102
pub pure fn to_result<T, U>(eith: Either<T, U>)
106103
-> Result<U, T> {
107104
/*!
@@ -117,21 +114,18 @@ pub pure fn to_result<T, U>(eith: Either<T, U>)
117114
}
118115
}
119116

120-
#[inline(always)]
121117
pub pure fn is_left<T, U>(eith: &Either<T, U>) -> bool {
122118
//! Checks whether the given value is a left
123119
124120
match *eith { Left(_) => true, _ => false }
125121
}
126122

127-
#[inline(always)]
128123
pub pure fn is_right<T, U>(eith: &Either<T, U>) -> bool {
129124
//! Checks whether the given value is a right
130125
131126
match *eith { Right(_) => true, _ => false }
132127
}
133128

134-
#[inline(always)]
135129
pub pure fn unwrap_left<T,U>(eith: Either<T,U>) -> T {
136130
//! Retrieves the value in the left branch. Fails if the either is Right.
137131
@@ -140,7 +134,6 @@ pub pure fn unwrap_left<T,U>(eith: Either<T,U>) -> T {
140134
}
141135
}
142136

143-
#[inline(always)]
144137
pub pure fn unwrap_right<T,U>(eith: Either<T,U>) -> U {
145138
//! Retrieves the value in the right branch. Fails if the either is Left.
146139

branches/incoming/src/libcore/f32.rs

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -105,52 +105,38 @@ pub const infinity: f32 = 1.0_f32/0.0_f32;
105105

106106
pub const neg_infinity: f32 = -1.0_f32/0.0_f32;
107107

108-
#[inline(always)]
109108
pub pure fn is_NaN(f: f32) -> bool { f != f }
110109

111-
#[inline(always)]
112110
pub pure fn add(x: f32, y: f32) -> f32 { return x + y; }
113111

114-
#[inline(always)]
115112
pub pure fn sub(x: f32, y: f32) -> f32 { return x - y; }
116113

117-
#[inline(always)]
118114
pub pure fn mul(x: f32, y: f32) -> f32 { return x * y; }
119115

120-
#[inline(always)]
121116
pub pure fn div(x: f32, y: f32) -> f32 { return x / y; }
122117

123-
#[inline(always)]
124118
pub pure fn rem(x: f32, y: f32) -> f32 { return x % y; }
125119

126-
#[inline(always)]
127120
pub pure fn lt(x: f32, y: f32) -> bool { return x < y; }
128121

129-
#[inline(always)]
130122
pub pure fn le(x: f32, y: f32) -> bool { return x <= y; }
131123

132-
#[inline(always)]
133124
pub pure fn eq(x: f32, y: f32) -> bool { return x == y; }
134125

135-
#[inline(always)]
136126
pub pure fn ne(x: f32, y: f32) -> bool { return x != y; }
137127

138-
#[inline(always)]
139128
pub pure fn ge(x: f32, y: f32) -> bool { return x >= y; }
140129

141-
#[inline(always)]
142130
pub pure fn gt(x: f32, y: f32) -> bool { return x > y; }
143131

144132
// FIXME (#1999): replace the predicates below with llvm intrinsics or
145133
// calls to the libmath macros in the rust runtime for performance.
146134

147135
/// Returns true if `x` is a positive number, including +0.0f320 and +Infinity
148-
#[inline(always)]
149136
pub pure fn is_positive(x: f32) -> bool
150137
{ return x > 0.0f32 || (1.0f32/x) == infinity; }
151138

152139
/// Returns true if `x` is a negative number, including -0.0f320 and -Infinity
153-
#[inline(always)]
154140
pub pure fn is_negative(x: f32) -> bool
155141
{ return x < 0.0f32 || (1.0f32/x) == neg_infinity; }
156142

@@ -159,7 +145,6 @@ pub pure fn is_negative(x: f32) -> bool
159145
*
160146
* This is the same as `f32::is_negative`.
161147
*/
162-
#[inline(always)]
163148
pub pure fn is_nonpositive(x: f32) -> bool {
164149
return x < 0.0f32 || (1.0f32/x) == neg_infinity;
165150
}
@@ -169,25 +154,21 @@ pub pure fn is_nonpositive(x: f32) -> bool {
169154
*
170155
* This is the same as `f32::is_positive`.)
171156
*/
172-
#[inline(always)]
173157
pub pure fn is_nonnegative(x: f32) -> bool {
174158
return x > 0.0f32 || (1.0f32/x) == infinity;
175159
}
176160

177161
/// Returns true if `x` is a zero number (positive or negative zero)
178-
#[inline(always)]
179162
pub pure fn is_zero(x: f32) -> bool {
180163
return x == 0.0f32 || x == -0.0f32;
181164
}
182165

183166
/// Returns true if `x`is an infinite number
184-
#[inline(always)]
185167
pub pure fn is_infinite(x: f32) -> bool {
186168
return x == infinity || x == neg_infinity;
187169
}
188170

189171
/// Returns true if `x`is a finite number
190-
#[inline(always)]
191172
pub pure fn is_finite(x: f32) -> bool {
192173
return !(is_NaN(x) || is_infinite(x));
193174
}
@@ -238,63 +219,45 @@ pub mod consts {
238219
pub const ln_10: f32 = 2.30258509299404568401799145468436421_f32;
239220
}
240221

241-
#[inline(always)]
242222
pub pure fn signbit(x: f32) -> int {
243223
if is_negative(x) { return 1; } else { return 0; }
244224
}
245225

246-
#[inline(always)]
247226
pub pure fn logarithm(n: f32, b: f32) -> f32 {
248227
return log2(n) / log2(b);
249228
}
250229

251230
#[cfg(notest)]
252231
impl f32 : cmp::Eq {
253-
#[inline(always)]
254232
pure fn eq(&self, other: &f32) -> bool { (*self) == (*other) }
255-
#[inline(always)]
256233
pure fn ne(&self, other: &f32) -> bool { (*self) != (*other) }
257234
}
258235

259236
#[cfg(notest)]
260237
impl f32 : cmp::Ord {
261-
#[inline(always)]
262238
pure fn lt(&self, other: &f32) -> bool { (*self) < (*other) }
263-
#[inline(always)]
264239
pure fn le(&self, other: &f32) -> bool { (*self) <= (*other) }
265-
#[inline(always)]
266240
pure fn ge(&self, other: &f32) -> bool { (*self) >= (*other) }
267-
#[inline(always)]
268241
pure fn gt(&self, other: &f32) -> bool { (*self) > (*other) }
269242
}
270243

271244
impl f32: num::Num {
272-
#[inline(always)]
273245
pure fn add(&self, other: &f32) -> f32 { return *self + *other; }
274-
#[inline(always)]
275246
pure fn sub(&self, other: &f32) -> f32 { return *self - *other; }
276-
#[inline(always)]
277247
pure fn mul(&self, other: &f32) -> f32 { return *self * *other; }
278-
#[inline(always)]
279248
pure fn div(&self, other: &f32) -> f32 { return *self / *other; }
280-
#[inline(always)]
281249
pure fn modulo(&self, other: &f32) -> f32 { return *self % *other; }
282-
#[inline(always)]
283250
pure fn neg(&self) -> f32 { return -*self; }
284251

285-
#[inline(always)]
286252
pure fn to_int(&self) -> int { return *self as int; }
287-
#[inline(always)]
288253
static pure fn from_int(n: int) -> f32 { return n as f32; }
289254
}
290255

291256
impl f32: num::Zero {
292-
#[inline(always)]
293257
static pure fn zero() -> f32 { 0.0 }
294258
}
295259

296260
impl f32: num::One {
297-
#[inline(always)]
298261
static pure fn one() -> f32 { 1.0 }
299262
}
300263

0 commit comments

Comments
 (0)