Skip to content

Commit 5ee3e9d

Browse files
committed
---
yaml --- r: 68351 b: refs/heads/auto c: 32adc0e h: refs/heads/master i: 68349: 52053a8 68347: 74f2a69 68343: 1320b7d 68335: d7012a5 68319: 21c2ca4 68287: 4daad7f 68223: 9663677 68095: a574a6a v: v3
1 parent 96678ff commit 5ee3e9d

File tree

29 files changed

+278
-536
lines changed

29 files changed

+278
-536
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: 3df37326cf880425625373f3e11f74afac4dbb67
17+
refs/heads/auto: 32adc0e730636f04d72d31e24fbf1101a495ccb7
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/.gitmodules

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
[submodule "src/llvm"]
22
path = src/llvm
33
url = https://github.com/brson/llvm.git
4-
branch = master
54
[submodule "src/libuv"]
65
path = src/libuv
76
url = https://github.com/brson/libuv.git
8-
branch = master

branches/auto/RELEASES.txt

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ Version 0.7 (July 2013)
44
* ??? changes, numerous bugfixes
55

66
* Syntax changes
7-
* `impl`s no longer accept a visibility qualifier. Put them on methods
8-
instead.
97
* `use mod` is no longer valid.
108
* `fail!` and `assert!` accept `~str`, `&'static str` or `fmt!`-style
119
argument list.
@@ -27,10 +25,6 @@ Version 0.7 (July 2013)
2725
no padding between fields.
2826
* The `for` loop protocol now requires `for`-iterators to return `bool`
2927
so they compose better.
30-
* Trait default methods work more often.
31-
* Type parameters bound by `Copy` must now be copied explicitly with
32-
the `copy` keyword.
33-
* It is now illegal to move out of a dereferenced unsafe pointer.
3428
* `Option<~T>` is now represented as a nullable pointer.
3529
* `@mut` does dynamic borrow checks correctly.
3630
* Macros TODO
@@ -49,30 +43,26 @@ Version 0.7 (July 2013)
4943
* Libraries
5044
* The `core` crate was renamed to `std`.
5145
* The `std` crate was renamed to `extra`.
52-
* std: `iterator` module for external iterator objects.
53-
* Many old-style (internal, higher-order function) iterators replaced by
54-
implementations of `Iterator`.
55-
* std: Many old internal vector and string iterators,
56-
incl. `any`, `all`. removed.
57-
* std: The `finalize` method of `Drop` renamed to `drop`.
46+
* `std::mut` removed.
5847
* std: The prelude no longer reexports any modules, only types and traits.
5948
* std: Prelude additions: `print`, `println`, `FromStr`, `ApproxEq`, `Equiv`,
6049
`Iterator`, `IteratorUtil`, many numeric traits, many tuple traits.
61-
* std: New numeric traits: `Fractional`, `Real`, `RealExt`, `Integer`, `Ratio`,
50+
* std: `iterator` module for external iterator objects.
51+
* std: Many old internal vector and string iterators,
52+
incl. `any`, `all`. removed.
53+
* std: new numeric traits: `Fractional`, `Real`, `RealExt`, `Integer`, `Ratio`,
6254
`Algebraic`, `Trigonometric`, `Exponential`, `Primitive`.
6355
* std: Tuple traits and accessors defined for up to 12-tuples, e.g.
6456
`(0, 1, 2).n2()` or `(0, 1, 2).n2_ref()`.
65-
* std: Many types implement `Clone`.
57+
* std: many types implement `Clone`.
6658
* std: `path` type renamed to `Path`.
67-
* std: `mut` module and `Mut` type removed.
6859
* std: Many standalone functions removed in favor of methods and iterators
6960
in `vec`, `str`. In the future methods will also work as functions.
70-
* std: `reinterpret_cast` removed. Use `transmute`.
61+
* std: `reinterpret_cast` removed. Used `transmute`.
7162
* std: ascii string handling in `std::ascii`.
7263
* std: `Rand` is implemented for ~/@.
7364
* std: `run` module for spawning processes overhauled.
7465
* std: Various atomic types added to `unstable::atomic`.
75-
* std: Various types implement `Zero`.
7666
* std: `LinearMap` and `LinearSet` renamed to `HashMap` and `HashSet`.
7767
* std: Borrowed pointer functions moved from `ptr` to `borrow`.
7868
* std: Added `os::mkdir_recursive`.
@@ -106,6 +96,7 @@ Version 0.7 (July 2013)
10696
* More and improved library documentation.
10797
* Various improvements on ARM and Android.
10898
* Various improvements to MIPS backend.
99+
* jemalloc is the Rust allocator.
109100

110101
Version 0.6 (April 2013)
111102
------------------------

branches/auto/src/etc/combine-tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def scrub(b):
6060
for t in stage2_tests:
6161
p = os.path.join("test", "run-pass", t)
6262
p = p.replace("\\", "\\\\")
63-
d.write(" out.write_str(\"run-pass [stage2]: %s\\n\");\n" % p)
63+
d.write(" out.write_str(~\"run-pass [stage2]: %s\\n\");\n" % p)
6464
d.write(" t_%d::main();\n" % i)
6565
i += 1
6666
d.write("}\n")

branches/auto/src/libextra/deque.rs

Lines changed: 1 addition & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
// except according to those terms.
1010

1111
//! A double-ended queue implemented as a circular buffer
12+
1213
use core::prelude::*;
1314

1415
use core::uint;
1516
use core::util::replace;
1617
use core::vec;
17-
use core::cast::transmute;
1818

1919
static initial_capacity: uint = 32u; // 2^5
2020

@@ -153,86 +153,7 @@ impl<T> Deque<T> {
153153
pub fn reserve_at_least(&mut self, n: uint) {
154154
vec::reserve_at_least(&mut self.elts, n);
155155
}
156-
157-
/// Front-to-back iterator.
158-
pub fn iter<'a>(&'a self) -> DequeIterator<'a, T> {
159-
DequeIterator { idx: self.lo, nelts: self.nelts, used: 0, vec: self.elts }
160-
}
161-
162-
/// Front-to-back iterator which returns mutable values.
163-
pub fn mut_iter<'a>(&'a mut self) -> DequeMutIterator<'a, T> {
164-
DequeMutIterator { idx: self.lo, nelts: self.nelts, used: 0, vec: self.elts }
165-
}
166-
167-
/// Back-to-front iterator.
168-
pub fn rev_iter<'a>(&'a self) -> DequeRevIterator<'a, T> {
169-
DequeRevIterator { idx: self.hi - 1u, nelts: self.nelts, used: 0, vec: self.elts }
170-
}
171-
172-
/// Back-to-front iterator which returns mutable values.
173-
pub fn mut_rev_iter<'a>(&'a mut self) -> DequeMutRevIterator<'a, T> {
174-
DequeMutRevIterator { idx: self.hi - 1u, nelts: self.nelts, used: 0, vec: self.elts }
175-
}
176-
}
177-
178-
macro_rules! iterator {
179-
(impl $name:ident -> $elem:ty, $step:expr) => {
180-
impl<'self, T> Iterator<$elem> for $name<'self, T> {
181-
#[inline]
182-
fn next(&mut self) -> Option<$elem> {
183-
if self.used >= self.nelts {
184-
return None;
185-
}
186-
let ret = unsafe {
187-
match self.vec[self.idx % self.vec.len()] {
188-
Some(ref e) => Some(transmute(e)),
189-
None => None
190-
}
191-
};
192-
self.idx += $step;
193-
self.used += 1;
194-
ret
195-
}
196-
}
197-
}
198-
}
199-
200-
/// Deque iterator
201-
pub struct DequeIterator<'self, T> {
202-
priv idx: uint,
203-
priv nelts: uint,
204-
priv used: uint,
205-
priv vec: &'self [Option<T>]
206-
}
207-
iterator!{impl DequeIterator -> &'self T, 1}
208-
209-
/// Deque reverse iterator
210-
pub struct DequeRevIterator<'self, T> {
211-
priv idx: uint,
212-
priv nelts: uint,
213-
priv used: uint,
214-
priv vec: &'self [Option<T>]
215156
}
216-
iterator!{impl DequeRevIterator -> &'self T, -1}
217-
218-
/// Deque mutable iterator
219-
pub struct DequeMutIterator<'self, T> {
220-
priv idx: uint,
221-
priv nelts: uint,
222-
priv used: uint,
223-
priv vec: &'self mut [Option<T>]
224-
225-
}
226-
iterator!{impl DequeMutIterator -> &'self mut T, 1}
227-
228-
/// Deque mutable reverse iterator
229-
pub struct DequeMutRevIterator<'self, T> {
230-
priv idx: uint,
231-
priv nelts: uint,
232-
priv used: uint,
233-
priv vec: &'self mut [Option<T>]
234-
}
235-
iterator!{impl DequeMutRevIterator -> &'self mut T, -1}
236157

237158
/// Grow is only called on full elts, so nelts is also len(elts), unlike
238159
/// elsewhere.
@@ -461,35 +382,4 @@ mod tests {
461382
assert_eq!(capacity(&mut d.elts), 64);
462383
}
463384

464-
#[test]
465-
fn test_iter() {
466-
let mut d = Deque::new();
467-
for std::int::range(0,5) |i| {
468-
d.add_back(i);
469-
}
470-
assert_eq!(d.iter().collect::<~[&int]>(),
471-
~[&0,&1,&2,&3,&4]);
472-
473-
for std::int::range(6,9) |i| {
474-
d.add_front(i);
475-
}
476-
assert_eq!(d.iter().collect::<~[&int]>(),
477-
~[&8,&7,&6,&0,&1,&2,&3,&4]);
478-
}
479-
480-
#[test]
481-
fn test_rev_iter() {
482-
let mut d = Deque::new();
483-
for std::int::range(0,5) |i| {
484-
d.add_back(i);
485-
}
486-
assert_eq!(d.rev_iter().collect::<~[&int]>(),
487-
~[&4,&3,&2,&1,&0]);
488-
489-
for std::int::range(6,9) |i| {
490-
d.add_front(i);
491-
}
492-
assert_eq!(d.rev_iter().collect::<~[&int]>(),
493-
~[&4,&3,&2,&1,&0,&6,&7,&8]);
494-
}
495385
}

branches/auto/src/libextra/priority_queue.rs

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,10 @@ impl<T:Ord> Mutable for PriorityQueue<T> {
3737
}
3838

3939
impl<T:Ord> PriorityQueue<T> {
40-
/// An iterator visiting all values in underlying vector, in
41-
/// arbitrary order.
42-
pub fn iter<'a>(&'a self) -> PriorityQueueIterator<'a, T> {
43-
PriorityQueueIterator { iter: self.data.iter() }
44-
}
40+
/// Visit all values in the underlying vector.
41+
///
42+
/// The values are **not** visited in order.
43+
pub fn each(&self, f: &fn(&T) -> bool) -> bool { self.data.iter().advance(f) }
4544

4645
/// Returns the greatest item in the queue - fails if empty
4746
pub fn top<'a>(&'a self) -> &'a T { &self.data[0] }
@@ -179,33 +178,11 @@ impl<T:Ord> PriorityQueue<T> {
179178
}
180179
}
181180

182-
/// PriorityQueue iterator
183-
pub struct PriorityQueueIterator <'self, T> {
184-
priv iter: vec::VecIterator<'self, T>,
185-
}
186-
187-
impl<'self, T> Iterator<&'self T> for PriorityQueueIterator<'self, T> {
188-
#[inline]
189-
fn next(&mut self) -> Option<(&'self T)> { self.iter.next() }
190-
}
191-
192181
#[cfg(test)]
193182
mod tests {
194183
use sort::merge_sort;
195184
use priority_queue::PriorityQueue;
196185

197-
#[test]
198-
fn test_iterator() {
199-
let data = ~[5, 9, 3];
200-
let iterout = ~[9, 5, 3];
201-
let pq = PriorityQueue::from_vec(data);
202-
let mut i = 0;
203-
for pq.iter().advance |el| {
204-
assert_eq!(*el, iterout[i]);
205-
i += 1;
206-
}
207-
}
208-
209186
#[test]
210187
fn test_top_and_pop() {
211188
let data = ~[2u, 4, 6, 2, 1, 8, 10, 3, 5, 7, 0, 9, 1];

0 commit comments

Comments
 (0)