Skip to content

Commit 06c0705

Browse files
committed
---
yaml --- r: 68827 b: refs/heads/auto c: 00da76d h: refs/heads/master i: 68825: c720183 68823: e3901d1 v: v3
1 parent 8d3d71a commit 06c0705

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
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: fd5f8d90c5cc593e6aa43a978a1498f88558cc39
17+
refs/heads/auto: 00da76dfbe3aba8c1ec399ecfa0eae4b4ba6885e
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/src/libstd/vec.rs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,6 @@ impl<T> OwnedVector<T> for ~[T] {
11361136
*
11371137
* * n - The number of elements to reserve space for
11381138
*/
1139-
#[inline]
11401139
#[cfg(stage0)]
11411140
fn reserve(&mut self, n: uint) {
11421141
// Only make the (slow) call into the runtime if we have to
@@ -1170,7 +1169,6 @@ impl<T> OwnedVector<T> for ~[T] {
11701169
*
11711170
* * n - The number of elements to reserve space for
11721171
*/
1173-
#[inline]
11741172
#[cfg(not(stage0))]
11751173
fn reserve(&mut self, n: uint) {
11761174
// Only make the (slow) call into the runtime if we have to
@@ -1228,21 +1226,12 @@ impl<T> OwnedVector<T> for ~[T] {
12281226
let repr: **raw::VecRepr = transmute(&mut *self);
12291227
let fill = (**repr).unboxed.fill;
12301228
if (**repr).unboxed.alloc <= fill {
1231-
// need more space
1232-
reserve_no_inline(self);
1229+
let new_len = self.len() + 1;
1230+
self.reserve_at_least(new_len);
12331231
}
12341232

12351233
self.push_fast(t);
12361234
}
1237-
1238-
// this peculiar function is because reserve_at_least is very
1239-
// large (because of reserve), and will be inlined, which
1240-
// makes push too large.
1241-
#[inline(never)]
1242-
fn reserve_no_inline<T>(v: &mut ~[T]) {
1243-
let new_len = v.len() + 1;
1244-
v.reserve_at_least(new_len);
1245-
}
12461235
}
12471236

12481237
// This doesn't bother to make sure we have space.

0 commit comments

Comments
 (0)