Skip to content

Commit 8cb4a3e

Browse files
committed
---
yaml --- r: 44527 b: refs/heads/master c: 59bb9c2 h: refs/heads/master i: 44525: 77176a7 44523: 6f83dd4 44519: b2c598a 44511: 10cce4a v: v3
1 parent c99756e commit 8cb4a3e

File tree

2 files changed

+1
-20
lines changed

2 files changed

+1
-20
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 9ad8a1f46566ddcd705cc918863cee2946d8b946
2+
refs/heads/master: 59bb9c2f1a85007c4b399767ecb98885e349aa2e
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d9689399d091c3265f00434a69c551a61c28dc
55
refs/heads/try: ef355f6332f83371e4acf04fc4eb940ab41d78d3

trunk/src/rt/rust_util.h

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,6 @@ extern struct type_desc str_body_tydesc;
1919

2020
// Inline fn used regularly elsewhere.
2121

22-
static inline size_t
23-
next_power_of_two(size_t s)
24-
{
25-
size_t tmp = s - 1;
26-
tmp |= tmp >> 1;
27-
tmp |= tmp >> 2;
28-
tmp |= tmp >> 4;
29-
tmp |= tmp >> 8;
30-
tmp |= tmp >> 16;
31-
#ifdef _LP64
32-
tmp |= tmp >> 32;
33-
#endif
34-
return tmp + 1;
35-
}
36-
3722
// Rounds |size| to the nearest |alignment|. Invariant: |alignment| is a power
3823
// of two.
3924
template<typename T>
@@ -91,10 +76,6 @@ inline void reserve_vec_exact(rust_task* task, rust_vec_box** vpp,
9176
}
9277
}
9378

94-
inline void reserve_vec(rust_task* task, rust_vec_box** vpp, size_t size) {
95-
reserve_vec_exact(task, vpp, next_power_of_two(size));
96-
}
97-
9879
typedef rust_vec_box rust_str;
9980

10081
inline rust_str *

0 commit comments

Comments
 (0)