Skip to content

Commit b121c0e

Browse files
committed
---
yaml --- r: 72175 b: refs/heads/dist-snap c: 1f97e6d h: refs/heads/master i: 72173: 6ee49b5 72171: 3718498 72167: 841f12f 72159: b12ff77 v: v3
1 parent 007e5c7 commit b121c0e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+5781
-5965
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: b50030718cf28f2a5a81857a26b57442734fe854
10-
refs/heads/dist-snap: 028dc589d1cfb7e44b36b978ea1dcc304d70cee0
10+
refs/heads/dist-snap: 1f97e6d47f90f1ddfef2d3a888099bd95b0bb1df
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/doc/tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1670,7 +1670,7 @@ do spawn {
16701670
~~~~
16711671

16721672
If you want to see the output of `debug!` statements, you will need to turn on `debug!` logging.
1673-
To enable `debug!` logging, set the RUST_LOG environment variable to the name of your crate, which, for a file named `foo.rs`, will be `foo` (e.g., with bash, `export RUST_LOG=foo`).
1673+
To enable `debug!` logging, set the RUST_LOG environment variable to `debug` (e.g., with bash, `export RUST_LOG=debug`)
16741674

16751675
## For loops
16761676

branches/dist-snap/src/etc/unicode.py

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -112,49 +112,7 @@ def escape_char(c):
112112
return "'\\u%4.4x'" % c
113113
return "'\\U%8.8x'" % c
114114

115-
def ch_prefix(ix):
116-
if ix == 0:
117-
return " "
118-
if ix % 2 == 0:
119-
return ",\n "
120-
else:
121-
return ", "
122-
123-
def emit_bsearch_range_table(f):
124-
f.write("""
125-
pure fn bsearch_range_table(c: char, r: &[(char,char)]) -> bool {
126-
use cmp::{EQ, LT, GT};
127-
use vec::bsearch;
128-
use option::None;
129-
(do bsearch(r) |&(lo,hi)| {
130-
if lo <= c && c <= hi { EQ }
131-
else if hi < c { LT }
132-
else { GT }
133-
}) != None
134-
}\n\n
135-
""");
136-
137115
def emit_property_module(f, mod, tbl):
138-
f.write("pub mod %s {\n" % mod)
139-
keys = tbl.keys()
140-
keys.sort()
141-
emit_bsearch_range_table(f);
142-
for cat in keys:
143-
f.write(" const %s_table : &[(char,char)] = &[\n" % cat)
144-
ix = 0
145-
for pair in tbl[cat]:
146-
f.write(ch_prefix(ix))
147-
f.write("(%s, %s)" % (escape_char(pair[0]), escape_char(pair[1])))
148-
ix += 1
149-
f.write("\n ];\n\n")
150-
151-
f.write(" pub pure fn %s(c: char) -> bool {\n" % cat)
152-
f.write(" bsearch_range_table(c, %s_table)\n" % cat)
153-
f.write(" }\n\n")
154-
f.write("}\n")
155-
156-
157-
def emit_property_module_old(f, mod, tbl):
158116
f.write("mod %s {\n" % mod)
159117
keys = tbl.keys()
160118
keys.sort()
@@ -235,9 +193,8 @@ def emit_decomp_module(f, canon, compat):
235193
rf = open(r, "w")
236194

237195
(canon_decomp, compat_decomp, gencats) = load_unicode_data("UnicodeData.txt")
196+
emit_decomp_module(rf, canon_decomp, compat_decomp)
238197
emit_property_module(rf, "general_category", gencats)
239198

240-
#emit_decomp_module(rf, canon_decomp, compat_decomp)
241-
242199
derived = load_derived_core_properties("DerivedCoreProperties.txt")
243200
emit_property_module(rf, "derived_property", derived)

branches/dist-snap/src/etc/x86.supp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@
583583
{
584584
llvm-optimization-reads-uninitialized-memory-3
585585
Memcheck:Cond
586-
fun:_ZN4test9run_tests*
586+
fun:_ZN4test9run_tests4anon13expr_fn_*
587587
...
588588
}
589589

branches/dist-snap/src/libcore/core.rc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,9 @@ pub use str::{StrSlice};
9595
pub use container::{Container, Mutable};
9696
pub use vec::{CopyableVector, ImmutableVector};
9797
pub use vec::{ImmutableEqVector, ImmutableCopyableVector};
98-
pub use vec::{OwnedVector, OwnedCopyableVector, MutableVector};
98+
pub use vec::{OwnedVector, OwnedCopyableVector};
9999
pub use iter::{BaseIter, ExtendedIter, EqIter, CopyableIter};
100100
pub use iter::{CopyableOrderedIter, CopyableNonstrictIter, Times};
101-
pub use iter::{ExtendedMutableIter};
102101

103102
pub use num::{Num, NumCast};
104103
pub use ptr::Ptr;

branches/dist-snap/src/libcore/hashmap.rs

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use container::{Container, Mutable, Map, Set};
1717
use cmp::{Eq, Equiv};
1818
use hash::Hash;
19+
use to_bytes::IterBytes;
1920
use iter::BaseIter;
2021
use hash::Hash;
2122
use iter;
@@ -71,7 +72,7 @@ fn linear_map_with_capacity_and_keys<K:Eq + Hash,V>(
7172
}
7273
}
7374

74-
priv impl<K:Hash + Eq,V> HashMap<K, V> {
75+
priv impl<K:Hash + IterBytes + Eq,V> HashMap<K, V> {
7576
#[inline(always)]
7677
fn to_bucket(&self, h: uint) -> uint {
7778
// A good hash function with entropy spread over all of the
@@ -110,8 +111,9 @@ priv impl<K:Hash + Eq,V> HashMap<K, V> {
110111
}
111112

112113
#[inline(always)]
113-
fn bucket_for_key_equiv<Q:Hash + Equiv<K>>(&self, k: &Q)
114-
-> SearchResult {
114+
fn bucket_for_key_equiv<Q:Hash + IterBytes + Equiv<K>>(&self,
115+
k: &Q)
116+
-> SearchResult {
115117
let hash = k.hash_keyed(self.k0, self.k1) as uint;
116118
self.bucket_for_key_with_hash_equiv(hash, k)
117119
}
@@ -301,15 +303,15 @@ priv impl<K:Hash + Eq,V> HashMap<K, V> {
301303
}
302304
}
303305
304-
impl<K:Hash + Eq,V> Container for HashMap<K, V> {
306+
impl<K:Hash + IterBytes + Eq,V> Container for HashMap<K, V> {
305307
/// Return the number of elements in the map
306308
fn len(&const self) -> uint { self.size }
307309
308310
/// Return true if the map contains no elements
309311
fn is_empty(&const self) -> bool { self.len() == 0 }
310312
}
311313
312-
impl<K:Hash + Eq,V> Mutable for HashMap<K, V> {
314+
impl<K:Hash + IterBytes + Eq,V> Mutable for HashMap<K, V> {
313315
/// Clear the map, removing all key-value pairs.
314316
fn clear(&mut self) {
315317
for uint::range(0, self.buckets.len()) |idx| {
@@ -319,7 +321,7 @@ impl<K:Hash + Eq,V> Mutable for HashMap<K, V> {
319321
}
320322
}
321323
322-
impl<K:Hash + Eq,V> Map<K, V> for HashMap<K, V> {
324+
impl<K:Hash + IterBytes + Eq,V> Map<K, V> for HashMap<K, V> {
323325
/// Return true if the map contains a value for the specified key
324326
fn contains_key(&self, k: &K) -> bool {
325327
match self.bucket_for_key(k) {
@@ -456,7 +458,7 @@ impl<K:Hash + Eq,V> Map<K, V> for HashMap<K, V> {
456458
}
457459
}
458460
459-
pub impl<K: Hash + Eq, V> HashMap<K, V> {
461+
pub impl<K: Hash + IterBytes + Eq, V> HashMap<K, V> {
460462
/// Create an empty HashMap
461463
fn new() -> HashMap<K, V> {
462464
HashMap::with_capacity(INITIAL_CAPACITY)
@@ -667,7 +669,8 @@ pub impl<K: Hash + Eq, V> HashMap<K, V> {
667669

668670
/// Return true if the map contains a value for the specified key,
669671
/// using equivalence
670-
fn contains_key_equiv<Q:Hash + Equiv<K>>(&self, key: &Q) -> bool {
672+
fn contains_key_equiv<Q:Hash + IterBytes + Equiv<K>>(&self, key: &Q)
673+
-> bool {
671674
match self.bucket_for_key_equiv(key) {
672675
FoundEntry(_) => {true}
673676
TableFull | FoundHole(_) => {false}
@@ -677,7 +680,8 @@ pub impl<K: Hash + Eq, V> HashMap<K, V> {
677680
/// Return the value corresponding to the key in the map, using
678681
/// equivalence
679682
#[cfg(stage0)]
680-
fn find_equiv<Q:Hash + Equiv<K>>(&self, k: &Q) -> Option<&'self V> {
683+
fn find_equiv<Q:Hash + IterBytes + Equiv<K>>(&self, k: &Q)
684+
-> Option<&'self V> {
681685
match self.bucket_for_key_equiv(k) {
682686
FoundEntry(idx) => Some(self.value_for_bucket(idx)),
683687
TableFull | FoundHole(_) => None,
@@ -689,15 +693,17 @@ pub impl<K: Hash + Eq, V> HashMap<K, V> {
689693
#[cfg(stage1)]
690694
#[cfg(stage2)]
691695
#[cfg(stage3)]
692-
fn find_equiv<'a, Q:Hash + Equiv<K>>(&'a self, k: &Q) -> Option<&'a V> {
696+
fn find_equiv<'a, Q:Hash + IterBytes + Equiv<K>>(
697+
&'a self, k: &Q) -> Option<&'a V>
698+
{
693699
match self.bucket_for_key_equiv(k) {
694700
FoundEntry(idx) => Some(self.value_for_bucket(idx)),
695701
TableFull | FoundHole(_) => None,
696702
}
697703
}
698704
}
699705

700-
impl<K:Hash + Eq,V:Eq> Eq for HashMap<K, V> {
706+
impl<K:Hash + IterBytes + Eq,V:Eq> Eq for HashMap<K, V> {
701707
fn eq(&self, other: &HashMap<K, V>) -> bool {
702708
if self.len() != other.len() { return false; }
703709

@@ -718,31 +724,31 @@ pub struct HashSet<T> {
718724
priv map: HashMap<T, ()>
719725
}
720726

721-
impl<T:Hash + Eq> BaseIter<T> for HashSet<T> {
727+
impl<T:Hash + IterBytes + Eq> BaseIter<T> for HashSet<T> {
722728
/// Visit all values in order
723729
fn each(&self, f: &fn(&T) -> bool) { self.map.each_key(f) }
724730
fn size_hint(&self) -> Option<uint> { Some(self.len()) }
725731
}
726732

727-
impl<T:Hash + Eq> Eq for HashSet<T> {
733+
impl<T:Hash + IterBytes + Eq> Eq for HashSet<T> {
728734
fn eq(&self, other: &HashSet<T>) -> bool { self.map == other.map }
729735
fn ne(&self, other: &HashSet<T>) -> bool { self.map != other.map }
730736
}
731737

732-
impl<T:Hash + Eq> Container for HashSet<T> {
738+
impl<T:Hash + IterBytes + Eq> Container for HashSet<T> {
733739
/// Return the number of elements in the set
734740
fn len(&const self) -> uint { self.map.len() }
735741

736742
/// Return true if the set contains no elements
737743
fn is_empty(&const self) -> bool { self.map.is_empty() }
738744
}
739745

740-
impl<T:Hash + Eq> Mutable for HashSet<T> {
746+
impl<T:Hash + IterBytes + Eq> Mutable for HashSet<T> {
741747
/// Clear the set, removing all values.
742748
fn clear(&mut self) { self.map.clear() }
743749
}
744750

745-
impl<T:Hash + Eq> Set<T> for HashSet<T> {
751+
impl<T:Hash + IterBytes + Eq> Set<T> for HashSet<T> {
746752
/// Return true if the set contains a value
747753
fn contains(&self, value: &T) -> bool { self.map.contains_key(value) }
748754

@@ -810,7 +816,7 @@ impl<T:Hash + Eq> Set<T> for HashSet<T> {
810816
}
811817
}
812818

813-
pub impl <T:Hash + Eq> HashSet<T> {
819+
pub impl <T:Hash + IterBytes + Eq> HashSet<T> {
814820
/// Create an empty HashSet
815821
fn new() -> HashSet<T> {
816822
HashSet::with_capacity(INITIAL_CAPACITY)

branches/dist-snap/src/libcore/iter.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@ pub trait ExtendedIter<A> {
4545
fn flat_map_to_vec<B,IB: BaseIter<B>>(&self, op: &fn(&A) -> IB) -> ~[B];
4646
}
4747

48-
pub trait ExtendedMutableIter<A> {
49-
fn eachi_mut(&mut self, blk: &fn(uint, &mut A) -> bool);
50-
}
51-
5248
pub trait EqIter<A:Eq> {
5349
fn contains(&self, x: &A) -> bool;
5450
fn count(&self, x: &A) -> uint;

branches/dist-snap/src/libcore/libc.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,12 +1097,9 @@ pub mod funcs {
10971097
unsafe fn setbuf(stream: *FILE, buf: *c_char);
10981098
// Omitted: printf and scanf variants.
10991099
unsafe fn fgetc(stream: *FILE) -> c_int;
1100-
#[fast_ffi]
11011100
unsafe fn fgets(buf: *mut c_char, n: c_int,
11021101
stream: *FILE) -> *c_char;
1103-
#[fast_ffi]
11041102
unsafe fn fputc(c: c_int, stream: *FILE) -> c_int;
1105-
#[fast_ffi]
11061103
unsafe fn fputs(s: *c_char, stream: *FILE) -> *c_char;
11071104
// Omitted: getc, getchar (might be macros).
11081105

@@ -1112,10 +1109,8 @@ pub mod funcs {
11121109
// Omitted: putc, putchar (might be macros).
11131110
unsafe fn puts(s: *c_char) -> c_int;
11141111
unsafe fn ungetc(c: c_int, stream: *FILE) -> c_int;
1115-
#[fast_ffi]
11161112
unsafe fn fread(ptr: *mut c_void, size: size_t,
11171113
nobj: size_t, stream: *FILE) -> size_t;
1118-
#[fast_ffi]
11191114
unsafe fn fwrite(ptr: *c_void, size: size_t,
11201115
nobj: size_t, stream: *FILE) -> size_t;
11211116
unsafe fn fseek(stream: *FILE, offset: c_long,
@@ -1149,13 +1144,9 @@ pub mod funcs {
11491144
-> c_long;
11501145
unsafe fn strtoul(s: *c_char, endp: **c_char, base: c_int)
11511146
-> c_ulong;
1152-
#[fast_ffi]
11531147
unsafe fn calloc(nobj: size_t, size: size_t) -> *c_void;
1154-
#[fast_ffi]
11551148
unsafe fn malloc(size: size_t) -> *c_void;
1156-
#[fast_ffi]
11571149
unsafe fn realloc(p: *c_void, size: size_t) -> *c_void;
1158-
#[fast_ffi]
11591150
unsafe fn free(p: *c_void);
11601151
unsafe fn abort() -> !;
11611152
unsafe fn exit(status: c_int) -> !;
@@ -1266,7 +1257,6 @@ pub mod funcs {
12661257
unsafe fn pclose(stream: *FILE) -> c_int;
12671258

12681259
#[link_name = "_fdopen"]
1269-
#[fast_ffi]
12701260
unsafe fn fdopen(fd: c_int, mode: *c_char) -> *FILE;
12711261

12721262
#[link_name = "_fileno"]
@@ -1350,7 +1340,6 @@ pub mod funcs {
13501340
textmode: c_int) -> c_int;
13511341

13521342
#[link_name = "_read"]
1353-
#[fast_ffi]
13541343
unsafe fn read(fd: c_int, buf: *mut c_void, count: c_uint)
13551344
-> c_int;
13561345

@@ -1361,7 +1350,6 @@ pub mod funcs {
13611350
unsafe fn unlink(c: *c_char) -> c_int;
13621351

13631352
#[link_name = "_write"]
1364-
#[fast_ffi]
13651353
unsafe fn write(fd: c_int, buf: *c_void, count: c_uint)
13661354
-> c_int;
13671355
}
@@ -1514,7 +1502,6 @@ pub mod funcs {
15141502
unsafe fn pathconf(path: *c_char, name: c_int) -> c_long;
15151503
unsafe fn pause() -> c_int;
15161504
unsafe fn pipe(fds: *mut c_int) -> c_int;
1517-
#[fast_ffi]
15181505
unsafe fn read(fd: c_int, buf: *mut c_void,
15191506
count: size_t) -> ssize_t;
15201507
unsafe fn rmdir(path: *c_char) -> c_int;
@@ -1527,7 +1514,6 @@ pub mod funcs {
15271514
unsafe fn tcgetpgrp(fd: c_int) -> pid_t;
15281515
unsafe fn ttyname(fd: c_int) -> *c_char;
15291516
unsafe fn unlink(c: *c_char) -> c_int;
1530-
#[fast_ffi]
15311517
unsafe fn write(fd: c_int, buf: *c_void, count: size_t)
15321518
-> ssize_t;
15331519
}

branches/dist-snap/src/libcore/num/int-template.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,4 +503,4 @@ mod tests {
503503
fn test_range_step_zero_step() {
504504
for range_step(0,10,0) |_i| {}
505505
}
506-
}
506+
}

branches/dist-snap/src/libcore/num/uint-template.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,4 +474,4 @@ mod tests {
474474
fn test_range_step_zero_step_down() {
475475
for range_step(0,-10,0) |_i| {}
476476
}
477-
}
477+
}

branches/dist-snap/src/libcore/prelude.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pub use container::{Container, Mutable, Map, Set};
3333
pub use hash::Hash;
3434
pub use iter::{BaseIter, ReverseIter, MutableIter, ExtendedIter, EqIter};
3535
pub use iter::{CopyableIter, CopyableOrderedIter, CopyableNonstrictIter};
36-
pub use iter::{Times, ExtendedMutableIter};
36+
pub use iter::Times;
3737
pub use num::{Num, NumCast};
3838
pub use path::GenericPath;
3939
pub use path::Path;
@@ -46,7 +46,7 @@ pub use to_str::ToStr;
4646
pub use tuple::{CopyableTuple, ImmutableTuple, ExtendedTupleOps};
4747
pub use vec::{CopyableVector, ImmutableVector};
4848
pub use vec::{ImmutableEqVector, ImmutableCopyableVector};
49-
pub use vec::{OwnedVector, OwnedCopyableVector, MutableVector};
49+
pub use vec::{OwnedVector, OwnedCopyableVector};
5050
pub use io::{Reader, ReaderUtil, Writer, WriterUtil};
5151

5252
/* Reexported runtime types */

branches/dist-snap/src/libcore/rt/io/file.rs

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

1111
use prelude::*;
12-
use super::misc::PathLike;
12+
use super::support::PathLike;
1313
use super::{Reader, Writer, Seek, Close};
1414
use super::{IoError, SeekStyle};
1515

16-
/// Open a file with the default FileMode and FileAccess
17-
/// # XXX are there sane defaults here?
18-
pub fn open_file<P: PathLike>(_path: &P) -> FileStream { fail!() }
19-
2016
/// # XXX
2117
/// * Ugh, this is ridiculous. What is the best way to represent these options?
2218
enum FileMode {

0 commit comments

Comments
 (0)