Skip to content

Commit 279dcae

Browse files
committed
---
yaml --- r: 56464 b: refs/heads/auto c: 35f33c1 h: refs/heads/master v: v3
1 parent 2fed7ff commit 279dcae

File tree

3 files changed

+1
-83
lines changed

3 files changed

+1
-83
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: 32df8ed877e6ec73eb787798384e114182caf08c
17+
refs/heads/auto: 35f33c17f7d242bce031a9e648e6c3f31dd59ef6
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/src/libcore/num/int-template/int.rs

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,6 @@ mod inst {
2727
#[inline(always)]
2828
fn bits() -> uint { 64 }
2929

30-
// fallback if we don't have access to the current word size
31-
#[cfg(not(target_word_size = "32"),
32-
not(target_word_size = "64"))]
33-
#[inline(always)]
34-
fn bits() -> uint { ::sys::size_of::<int>() * 8 }
35-
3630
#[inline(always)]
3731
fn bytes() -> uint { Primitive::bits::<int>() / 8 }
3832
}
@@ -69,41 +63,6 @@ mod inst {
6963
fn trailing_zeros(&self) -> int { (*self as i32).trailing_zeros() as int }
7064
}
7165

72-
// fallback if we don't have access to the current word size
73-
#[cfg(not(target_word_size = "32"),
74-
not(target_word_size = "64"))]
75-
impl BitCount for int {
76-
/// Counts the number of bits set.
77-
#[inline(always)]
78-
fn population_count(&self) -> int {
79-
match ::sys::size_of::<int>() {
80-
8 => (*self as i64).population_count() as int,
81-
4 => (*self as i32).population_count() as int,
82-
s => fail!(fmt!("unsupported word size: %?", s)),
83-
}
84-
}
85-
86-
/// Counts the number of leading zeros.
87-
#[inline(always)]
88-
fn leading_zeros(&self) -> int {
89-
match ::sys::size_of::<int>() {
90-
8 => (*self as i64).leading_zeros() as int,
91-
4 => (*self as i32).leading_zeros() as int,
92-
s => fail!(fmt!("unsupported word size: %?", s)),
93-
}
94-
}
95-
96-
/// Counts the number of trailing zeros.
97-
#[inline(always)]
98-
fn trailing_zeros(&self) -> int {
99-
match ::sys::size_of::<int>() {
100-
8 => (*self as i64).trailing_zeros() as int,
101-
4 => (*self as i32).trailing_zeros() as int,
102-
s => fail!(fmt!("unsupported word size: %?", s)),
103-
}
104-
}
105-
}
106-
10766
/// Returns `base` raised to the power of `exponent`
10867
pub fn pow(base: int, exponent: uint) -> int {
10968
if exponent == 0u {

branches/auto/src/libcore/num/uint-template/uint.rs

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,6 @@ pub mod inst {
4141
#[inline(always)]
4242
fn bits() -> uint { 64 }
4343

44-
// fallback if we don't have access to the current word size
45-
#[cfg(not(target_word_size = "32"),
46-
not(target_word_size = "64"))]
47-
#[inline(always)]
48-
fn bits() -> uint { sys::size_of::<uint>() * 8 }
49-
5044
#[inline(always)]
5145
fn bytes() -> uint { Primitive::bits::<uint>() / 8 }
5246
}
@@ -83,41 +77,6 @@ pub mod inst {
8377
fn trailing_zeros(&self) -> uint { (*self as i32).trailing_zeros() as uint }
8478
}
8579

86-
// fallback if we don't have access to the current word size
87-
#[cfg(not(target_word_size = "32"),
88-
not(target_word_size = "64"))]
89-
impl BitCount for uint {
90-
/// Counts the number of bits set.
91-
#[inline(always)]
92-
fn population_count(&self) -> uint {
93-
match sys::size_of::<uint>() {
94-
8 => (*self as i64).population_count() as uint,
95-
4 => (*self as i32).population_count() as uint,
96-
s => fail!(fmt!("unsupported word size: %?", s)),
97-
}
98-
}
99-
100-
/// Counts the number of leading zeros.
101-
#[inline(always)]
102-
fn leading_zeros(&self) -> uint {
103-
match sys::size_of::<uint>() {
104-
8 => (*self as i64).leading_zeros() as uint,
105-
4 => (*self as i32).leading_zeros() as uint,
106-
s => fail!(fmt!("unsupported word size: %?", s)),
107-
}
108-
}
109-
110-
/// Counts the number of trailing zeros.
111-
#[inline(always)]
112-
fn trailing_zeros(&self) -> uint {
113-
match sys::size_of::<uint>() {
114-
8 => (*self as i64).trailing_zeros() as uint,
115-
4 => (*self as i32).trailing_zeros() as uint,
116-
s => fail!(fmt!("unsupported word size: %?", s)),
117-
}
118-
}
119-
}
120-
12180
///
12281
/// Divide two numbers, return the result, rounded up.
12382
///

0 commit comments

Comments
 (0)