auto merge of #5443 : Ms2ger/servo/int, r=saneyuki

This commit is contained in:
bors-servo 2015-03-29 16:16:01 -06:00
commit a0a1304be0
4 changed files with 10 additions and 10 deletions

View file

@ -122,7 +122,7 @@ impl<'a> PartialEq<ApplicableDeclarationsCacheEntry> for ApplicableDeclarationsC
impl<'a> Hash for ApplicableDeclarationsCacheQuery<'a> { impl<'a> Hash for ApplicableDeclarationsCacheQuery<'a> {
fn hash<H: Hasher>(&self, state: &mut H) { fn hash<H: Hasher>(&self, state: &mut H) {
for declaration in self.declarations.iter() { for declaration in self.declarations.iter() {
let ptr: uint = unsafe { let ptr: usize = unsafe {
mem::transmute_copy(declaration) mem::transmute_copy(declaration)
}; };
ptr.hash(state); ptr.hash(state);
@ -130,7 +130,7 @@ impl<'a> Hash for ApplicableDeclarationsCacheQuery<'a> {
} }
} }
static APPLICABLE_DECLARATIONS_CACHE_SIZE: uint = 32; static APPLICABLE_DECLARATIONS_CACHE_SIZE: usize = 32;
pub struct ApplicableDeclarationsCache { pub struct ApplicableDeclarationsCache {
cache: SimpleHashCache<ApplicableDeclarationsCacheEntry,Arc<ComputedValues>>, cache: SimpleHashCache<ApplicableDeclarationsCacheEntry,Arc<ComputedValues>>,
@ -331,7 +331,7 @@ impl StyleSharingCandidate {
} }
} }
static STYLE_SHARING_CANDIDATE_CACHE_SIZE: uint = 40; static STYLE_SHARING_CANDIDATE_CACHE_SIZE: usize = 40;
impl StyleSharingCandidateCache { impl StyleSharingCandidateCache {
pub fn new() -> StyleSharingCandidateCache { pub fn new() -> StyleSharingCandidateCache {
@ -351,7 +351,7 @@ impl StyleSharingCandidateCache {
} }
} }
pub fn touch(&mut self, index: uint) { pub fn touch(&mut self, index: usize) {
self.cache.touch(index) self.cache.touch(index)
} }
} }
@ -363,7 +363,7 @@ pub enum StyleSharingResult {
CannotShare(bool), CannotShare(bool),
/// The node's style can be shared. The integer specifies the index in the LRU cache that was /// The node's style can be shared. The integer specifies the index in the LRU cache that was
/// hit and the damage that was done. /// hit and the damage that was done.
StyleWasShared(uint, RestyleDamage), StyleWasShared(usize, RestyleDamage),
} }
pub trait MatchMethods { pub trait MatchMethods {

View file

@ -153,7 +153,7 @@ impl Floats {
} }
} }
pub fn len(&self) -> uint { pub fn len(&self) -> usize {
self.list.floats.len() self.list.floats.len()
} }

View file

@ -102,7 +102,7 @@ impl FlowList {
/// O(1) /// O(1)
#[inline] #[inline]
pub fn len(&self) -> uint { pub fn len(&self) -> usize {
self.flows.len() self.flows.len()
} }
} }
@ -115,7 +115,7 @@ impl<'a> Iterator for FlowListIterator<'a> {
} }
#[inline] #[inline]
fn size_hint(&self) -> (uint, Option<uint>) { fn size_hint(&self) -> (usize, Option<usize>) {
self.it.size_hint() self.it.size_hint()
} }
} }
@ -128,7 +128,7 @@ impl<'a> Iterator for MutFlowListIterator<'a> {
} }
#[inline] #[inline]
fn size_hint(&self) -> (uint, Option<uint>) { fn size_hint(&self) -> (usize, Option<usize>) {
self.it.size_hint() self.it.size_hint()
} }
} }

View file

@ -35,7 +35,7 @@ fn static_assertion(node: UnsafeLayoutNode) {
} }
/// Vtable + pointer representation of a Flow trait object. /// Vtable + pointer representation of a Flow trait object.
pub type UnsafeFlow = (uint, uint); pub type UnsafeFlow = (usize, usize);
fn null_unsafe_flow() -> UnsafeFlow { fn null_unsafe_flow() -> UnsafeFlow {
(0, 0) (0, 0)