about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-02-16 11:03:58 -0800
committerbors <bors@rust-lang.org>2013-02-16 11:03:58 -0800
commitc53b4f3b91be10560bf2f2094f39b7a8a7e9166f (patch)
treef67d323d4f46665fe36fb27e34f62b0d6c27c15a
parent27822022016f0b701c4bfd851bf20ba29500ae1b (diff)
parent59bb9c2f1a85007c4b399767ecb98885e349aa2e (diff)
downloadrust-c53b4f3b91be10560bf2f2094f39b7a8a7e9166f.tar.gz
rust-c53b4f3b91be10560bf2f2094f39b7a8a7e9166f.zip
auto merge of #4975 : thestinger/rust/rt, r=nikomatsakis
-rw-r--r--src/rt/rust_util.h19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/rt/rust_util.h b/src/rt/rust_util.h
index b5827e0724b..0385804a778 100644
--- a/src/rt/rust_util.h
+++ b/src/rt/rust_util.h
@@ -19,21 +19,6 @@ extern struct type_desc str_body_tydesc;
 
 // Inline fn used regularly elsewhere.
 
-static inline size_t
-next_power_of_two(size_t s)
-{
-    size_t tmp = s - 1;
-    tmp |= tmp >> 1;
-    tmp |= tmp >> 2;
-    tmp |= tmp >> 4;
-    tmp |= tmp >> 8;
-    tmp |= tmp >> 16;
-#ifdef _LP64
-    tmp |= tmp >> 32;
-#endif
-    return tmp + 1;
-}
-
 // Rounds |size| to the nearest |alignment|. Invariant: |alignment| is a power
 // of two.
 template<typename T>
@@ -91,10 +76,6 @@ inline void reserve_vec_exact(rust_task* task, rust_vec_box** vpp,
     }
 }
 
-inline void reserve_vec(rust_task* task, rust_vec_box** vpp, size_t size) {
-    reserve_vec_exact(task, vpp, next_power_of_two(size));
-}
-
 typedef rust_vec_box rust_str;
 
 inline rust_str *