Skip to content

Commit 77ff383

Browse files
committed
---
yaml --- r: 142749 b: refs/heads/try2 c: 00da76d h: refs/heads/master i: 142747: 35ab3b5 v: v3
1 parent 1dd91e6 commit 77ff383

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
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: fd5f8d90c5cc593e6aa43a978a1498f88558cc39
8+
refs/heads/try2: 00da76dfbe3aba8c1ec399ecfa0eae4b4ba6885e
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/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)