Skip to content

Commit d904c72

Browse files
committed
replace #[inline(always)] with #[inline]. r=burningtree.
1 parent 303d7bf commit d904c72

Some content is hidden

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

79 files changed

+1319
-1319
lines changed

src/libextra/arc.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ pub struct Condvar<'self> {
5858

5959
impl<'self> Condvar<'self> {
6060
/// Atomically exit the associated ARC and block until a signal is sent.
61-
#[inline(always)]
61+
#[inline]
6262
pub fn wait(&self) { self.wait_on(0) }
6363

6464
/**
@@ -67,7 +67,7 @@ impl<'self> Condvar<'self> {
6767
*
6868
* wait() is equivalent to wait_on(0).
6969
*/
70-
#[inline(always)]
70+
#[inline]
7171
pub fn wait_on(&self, condvar_id: uint) {
7272
assert!(!*self.failed);
7373
self.cond.wait_on(condvar_id);
@@ -76,28 +76,28 @@ impl<'self> Condvar<'self> {
7676
}
7777

7878
/// Wake up a blocked task. Returns false if there was no blocked task.
79-
#[inline(always)]
79+
#[inline]
8080
pub fn signal(&self) -> bool { self.signal_on(0) }
8181

8282
/**
8383
* Wake up a blocked task on a specified condvar (as
8484
* sync::cond.signal_on). Returns false if there was no blocked task.
8585
*/
86-
#[inline(always)]
86+
#[inline]
8787
pub fn signal_on(&self, condvar_id: uint) -> bool {
8888
assert!(!*self.failed);
8989
self.cond.signal_on(condvar_id)
9090
}
9191

9292
/// Wake up all blocked tasks. Returns the number of tasks woken.
93-
#[inline(always)]
93+
#[inline]
9494
pub fn broadcast(&self) -> uint { self.broadcast_on(0) }
9595

9696
/**
9797
* Wake up all blocked tasks on a specified condvar (as
9898
* sync::cond.broadcast_on). Returns the number of tasks woken.
9999
*/
100-
#[inline(always)]
100+
#[inline]
101101
pub fn broadcast_on(&self, condvar_id: uint) -> uint {
102102
assert!(!*self.failed);
103103
self.cond.broadcast_on(condvar_id)
@@ -198,7 +198,7 @@ impl<T:Owned> MutexARC<T> {
198198
* any tasks that subsequently try to access it (including those already
199199
* blocked on the mutex) will also fail immediately.
200200
*/
201-
#[inline(always)]
201+
#[inline]
202202
pub unsafe fn access<U>(&self, blk: &fn(x: &mut T) -> U) -> U {
203203
unsafe {
204204
let state = self.x.get();
@@ -213,7 +213,7 @@ impl<T:Owned> MutexARC<T> {
213213
}
214214

215215
/// As access(), but with a condvar, as sync::mutex.lock_cond().
216-
#[inline(always)]
216+
#[inline]
217217
pub unsafe fn access_cond<'x, 'c, U>(&self,
218218
blk: &fn(x: &'x mut T,
219219
c: &'c Condvar) -> U)
@@ -231,7 +231,7 @@ impl<T:Owned> MutexARC<T> {
231231
}
232232

233233
// Common code for {mutex.access,rwlock.write}{,_cond}.
234-
#[inline(always)]
234+
#[inline]
235235
#[doc(hidden)]
236236
fn check_poison(is_mutex: bool, failed: bool) {
237237
if failed {
@@ -322,7 +322,7 @@ impl<T:Const + Owned> RWARC<T> {
322322
* that other tasks won't block forever. As MutexARC.access, it will also
323323
* poison the ARC, so subsequent readers and writers will both also fail.
324324
*/
325-
#[inline(always)]
325+
#[inline]
326326
pub fn write<U>(&self, blk: &fn(x: &mut T) -> U) -> U {
327327
unsafe {
328328
let state = self.x.get();
@@ -335,7 +335,7 @@ impl<T:Const + Owned> RWARC<T> {
335335
}
336336

337337
/// As write(), but with a condvar, as sync::rwlock.write_cond().
338-
#[inline(always)]
338+
#[inline]
339339
pub fn write_cond<'x, 'c, U>(&self,
340340
blk: &fn(x: &'x mut T, c: &'c Condvar) -> U)
341341
-> U {

src/libextra/arena.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ pub fn Arena() -> Arena {
119119
arena_with_size(32u)
120120
}
121121

122-
#[inline(always)]
122+
#[inline]
123123
fn round_up_to(base: uint, align: uint) -> uint {
124124
(base + (align - 1)) & !(align - 1)
125125
}
@@ -156,12 +156,12 @@ unsafe fn destroy_chunk(chunk: &Chunk) {
156156
// initialized in the arena in the low bit of the tydesc pointer. This
157157
// is necessary in order to properly do cleanup if a failure occurs
158158
// during an initializer.
159-
#[inline(always)]
159+
#[inline]
160160
unsafe fn bitpack_tydesc_ptr(p: *TypeDesc, is_done: bool) -> uint {
161161
let p_bits: uint = transmute(p);
162162
p_bits | (is_done as uint)
163163
}
164-
#[inline(always)]
164+
#[inline]
165165
unsafe fn un_bitpack_tydesc_ptr(p: uint) -> (*TypeDesc, bool) {
166166
(transmute(p & !1), p & 1 == 1)
167167
}
@@ -179,7 +179,7 @@ impl Arena {
179179
return self.alloc_pod_inner(n_bytes, align);
180180
}
181181

182-
#[inline(always)]
182+
#[inline]
183183
fn alloc_pod_inner(&mut self, n_bytes: uint, align: uint) -> *u8 {
184184
unsafe {
185185
// XXX: Borrow check
@@ -199,7 +199,7 @@ impl Arena {
199199
}
200200
}
201201

202-
#[inline(always)]
202+
#[inline]
203203
fn alloc_pod<'a, T>(&'a mut self, op: &fn() -> T) -> &'a T {
204204
unsafe {
205205
let tydesc = sys::get_type_desc::<T>();
@@ -223,7 +223,7 @@ impl Arena {
223223
return self.alloc_nonpod_inner(n_bytes, align);
224224
}
225225

226-
#[inline(always)]
226+
#[inline]
227227
fn alloc_nonpod_inner(&mut self, n_bytes: uint, align: uint)
228228
-> (*u8, *u8) {
229229
unsafe {
@@ -246,7 +246,7 @@ impl Arena {
246246
}
247247
}
248248

249-
#[inline(always)]
249+
#[inline]
250250
fn alloc_nonpod<'a, T>(&'a mut self, op: &fn() -> T) -> &'a T {
251251
unsafe {
252252
let tydesc = sys::get_type_desc::<T>();
@@ -268,7 +268,7 @@ impl Arena {
268268
}
269269

270270
// The external interface
271-
#[inline(always)]
271+
#[inline]
272272
pub fn alloc<'a, T>(&'a mut self, op: &fn() -> T) -> &'a T {
273273
unsafe {
274274
// XXX: Borrow check

0 commit comments

Comments
 (0)