core: Demode int/uint mods

This commit is contained in:
Brian Anderson 2012-08-29 16:11:06 -07:00
parent ee2ce036cc
commit c0c8d3aa8f
15 changed files with 34 additions and 26 deletions

View file

@ -135,7 +135,7 @@ impl &Arena {
fn alloc_pod_grow(n_bytes: uint, align: uint) -> *u8 {
// Allocate a new chunk.
let chunk_size = at_vec::capacity(self.pod_head.data);
let new_min_chunk_size = uint::max(n_bytes, chunk_size);
let new_min_chunk_size = uint::max(&n_bytes, &chunk_size);
self.chunks = @cons(copy self.pod_head, self.chunks);
self.pod_head =
chunk(uint::next_power_of_two(new_min_chunk_size + 1u), true);
@ -177,7 +177,7 @@ impl &Arena {
fn alloc_nonpod_grow(n_bytes: uint, align: uint) -> (*u8, *u8) {
// Allocate a new chunk.
let chunk_size = at_vec::capacity(self.head.data);
let new_min_chunk_size = uint::max(n_bytes, chunk_size);
let new_min_chunk_size = uint::max(&n_bytes, &chunk_size);
self.chunks = @cons(copy self.head, self.chunks);
self.head =
chunk(uint::next_power_of_two(new_min_chunk_size + 1u), false);

View file

@ -772,7 +772,7 @@ impl tcp_socket_buf: io::Reader {
}
}
let count = uint::min(len, self.data.buf.len());
let count = uint::min(&len, &self.data.buf.len());
let mut data = ~[];
self.data.buf <-> data;

View file

@ -30,7 +30,7 @@ fn map_slices<A: copy send, B: copy send>(
~[f()(0u, xs)]
}
else {
let num_tasks = uint::min(max_tasks, len / min_granularity);
let num_tasks = uint::min(&max_tasks, &(len / min_granularity));
let items_per_task = len / num_tasks;
@ -38,7 +38,7 @@ fn map_slices<A: copy send, B: copy send>(
let mut base = 0u;
log(info, ~"spawning tasks");
while base < len {
let end = uint::min(len, base + items_per_task);
let end = uint::min(&len, &(base + items_per_task));
// FIXME: why is the ::<A, ()> annotation required here? (#2617)
do vec::as_buf::<A, ()>(xs) |p, _len| {
let f = f();

View file

@ -1002,7 +1002,7 @@ mod node {
right : right,
char_len: char_len(left) + char_len(right),
byte_len: byte_len(left) + byte_len(right),
height: uint::max(height(left), height(right)) + 1u
height: uint::max(&height(left), &height(right)) + 1u
})
}