Skip to content

Commit 1717340

Browse files
committed
---
yaml --- r: 139052 b: refs/heads/try2 c: 4f23850 h: refs/heads/master v: v3
1 parent ba3210c commit 1717340

File tree

94 files changed

+211
-708
lines changed

Some content is hidden

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

94 files changed

+211
-708
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: 6307d24364c02ff636b6c76e0ac8b379d73b86f7
8+
refs/heads/try2: 4f238503d8730486fd9c72c71f1043a2f925299d
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/RELEASES.txt

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ Version 0.6 (March 2013)
1010
* Remove `static` keyword
1111
* Static method syntax
1212
* `as Trait`
13-
* `copy` removed, replaced with `Clone`?
14-
* `std::map` removed, replaced with `core::hashmap`
13+
* `copy` removed?
1514

1615
* Syntax changes
1716
* The self type parameter in traits is now spelled `Self`
@@ -39,8 +38,7 @@ Version 0.6 (March 2013)
3938
* Trait implementations no longer support visibility modifiers
4039

4140
* Semantic changes
42-
* Types with owned pointers or custom destructors move by default,
43-
eliminating the `move` keyword
41+
* Linear types move by default, eliminating the `move` keyword
4442
* All foreign functions are considered unsafe
4543
* &mut is now unaliasable
4644
* Writes to borrowed @mut pointers are prevented dynamically
@@ -59,19 +57,16 @@ Version 0.6 (March 2013)
5957
improve inference and eliminate unsoundness
6058

6159
* Libraries
60+
* Lots of effort to organize the container API's around `core::container`
61+
* `core::send_map` renamed to `core::hashmap`
6262
* Added big integers to `std::bigint`
6363
* Removed `core::oldcomm` module
6464
* Added pipe-based `core::comm` module
65+
* Reimplemented `std::treemap`
6566
* Numeric traits have been reorganized under `core::num`
67+
* `core::dvec` removed. Use `@mut ~[T]` or other language types
6668
* `vec::slice` finally returns a slice
6769
* `debug!` and friends don't require a format string, e.g. `debug!(Foo)`
68-
* Containers reorganized around traits in `core::container`
69-
* `core::dvec` removed, `~[T]` is a drop-in replacement
70-
* `core::send_map` renamed to `core::hashmap`
71-
* `std::treemap` reimplemented as an owned balanced tree
72-
* `std::deque` and `std::smallintmap` reimplemented as owned containers
73-
* `core::trie` added as a fast ordered map for integer keys
74-
* Set types added to `core::hashmap`, `core::trie` and `std::treemap`
7570

7671
* Tools
7772
* Replaced the 'cargo' package manager with 'rustpkg'

branches/try2/mk/rt.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ rt/$(1)/%.o: rt/%.S $$(MKFILE_DEPS) \
132132

133133
rt/$(1)/arch/$$(HOST_$(1))/libmorestack.a: $$(MORESTACK_OBJ_$(1))
134134
@$$(call E, link: $$@)
135-
$$(Q)$(AR_$(1)) rcs $$@ $$<
135+
$$(Q)ar rcs $$@ $$<
136136

137137
rt/$(1)/$(CFG_RUNTIME_$(1)): $$(RUNTIME_OBJS_$(1)) $$(MKFILE_DEPS) \
138138
$$(RUNTIME_DEF_$(1)) \

branches/try2/src/libcore/cleanup.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,11 @@ unsafe fn each_live_alloc(f: &fn(box: *mut BoxRepr, uniq: bool) -> bool) {
145145

146146
#[cfg(unix)]
147147
fn debug_mem() -> bool {
148-
::rt::env::get().debug_mem
148+
use os;
149+
use libc;
150+
do os::as_c_charp("RUST_DEBUG_MEM") |p| {
151+
unsafe { libc::getenv(p) != null() }
152+
}
149153
}
150154

151155
#[cfg(windows)]

branches/try2/src/libcore/clone.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ impl Clone for () {
2020
fn clone(&self) -> () { () }
2121
}
2222

23-
impl<T:Clone> Clone for ~T {
24-
#[inline(always)]
25-
fn clone(&self) -> ~T { ~(**self).clone() }
26-
}
27-
2823
macro_rules! clone_impl(
2924
($t:ty) => {
3025
impl Clone for $t {

branches/try2/src/libcore/container.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ pub trait Map<K, V>: Mutable {
3535
/// Visit all values
3636
pure fn each_value(&self, f: &fn(&V) -> bool);
3737

38-
/// Iterate over the map and mutate the contained values
39-
fn mutate_values(&mut self, f: &fn(&K, &mut V) -> bool);
40-
4138
/// Return the value corresponding to the key in the map
4239
pure fn find(&self, key: &K) -> Option<&self/V>;
4340

branches/try2/src/libcore/core.rc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ Implicitly, all crates behave as if they included the following prologue:
5656

5757
// On Linux, link to the runtime with -lrt.
5858
#[cfg(target_os = "linux")]
59-
#[doc(hidden)]
6059
pub mod linkhack {
6160
#[link_args="-lrustrt -lrt"]
6261
#[link_args = "-lpthread"]
@@ -253,7 +252,7 @@ pub mod rt;
253252
// A curious inner-module that's not exported that contains the binding
254253
// 'core' so that macro-expanded references to core::error and such
255254
// can be resolved within libcore.
256-
#[doc(hidden)]
255+
#[doc(hidden)] // FIXME #3538
257256
pub mod core {
258257
#[cfg(stage0)]
259258
pub const error : u32 = 1_u32;

branches/try2/src/libcore/hashmap.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -325,19 +325,6 @@ pub mod linear {
325325
self.each(|&(_, v)| blk(v))
326326
}
327327
328-
/// Iterate over the map and mutate the contained values
329-
fn mutate_values(&mut self, blk: &fn(&'self K,
330-
&'self mut V) -> bool) {
331-
for uint::range(0, self.buckets.len()) |i| {
332-
match self.buckets[i] {
333-
Some(Bucket{key: ref key, value: ref mut value, _}) => {
334-
if !blk(key, value) { return }
335-
}
336-
None => ()
337-
}
338-
}
339-
}
340-
341328
/// Return the value corresponding to the key in the map
342329
pure fn find(&self, k: &K) -> Option<&self/V> {
343330
match self.bucket_for_key(k) {

branches/try2/src/libcore/iter.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ pub trait ReverseIter<A>: BaseIter<A> {
3131
pure fn each_reverse(&self, blk: &fn(&A) -> bool);
3232
}
3333

34-
pub trait MutableIter<A>: BaseIter<A> {
35-
fn each_mut(&mut self, blk: &fn(&mut A) -> bool);
36-
}
37-
3834
pub trait ExtendedIter<A> {
3935
pure fn eachi(&self, blk: &fn(uint, v: &A) -> bool);
4036
pure fn all(&self, blk: &fn(&A) -> bool) -> bool;

branches/try2/src/libcore/option.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ use ops::Add;
4646
use kinds::Copy;
4747
use util;
4848
use num::Zero;
49-
use iter::{BaseIter, MutableIter};
49+
use iter::BaseIter;
5050

5151
#[cfg(test)] use ptr;
5252
#[cfg(test)] use str;
@@ -323,13 +323,6 @@ impl<T> BaseIter<T> for Option<T> {
323323
}
324324
}
325325
326-
impl<T> MutableIter<T> for Option<T> {
327-
#[inline(always)]
328-
fn each_mut(&mut self, f: &fn(&'self mut T) -> bool) {
329-
match *self { None => (), Some(ref mut t) => { f(t); } }
330-
}
331-
}
332-
333326
pub impl<T> Option<T> {
334327
/// Returns true if the option equals `none`
335328
#[inline(always)]

branches/try2/src/libcore/prelude.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@ pub use clone::Clone;
2727
pub use cmp::{Eq, Ord, TotalOrd, Ordering, Less, Equal, Greater};
2828
pub use container::{Container, Mutable, Map, Set};
2929
pub use hash::Hash;
30-
pub use iter::{BaseIter, ReverseIter, MutableIter, ExtendedIter, EqIter};
31-
pub use iter::{CopyableIter, CopyableOrderedIter, CopyableNonstrictIter};
32-
pub use iter::Times;
30+
pub use iter::{BaseIter, ReverseIter, ExtendedIter, EqIter, CopyableIter};
31+
pub use iter::{CopyableOrderedIter, CopyableNonstrictIter, Times};
3332
pub use num::NumCast;
3433
pub use path::GenericPath;
3534
pub use path::Path;
@@ -44,10 +43,6 @@ pub use vec::{CopyableVector, ImmutableVector};
4443
pub use vec::{ImmutableEqVector, ImmutableCopyableVector};
4544
pub use vec::{OwnedVector, OwnedCopyableVector};
4645

47-
/* Reexported runtime types */
48-
pub use comm::{stream, Port, Chan, GenericChan, GenericSmartChan, GenericPort, Peekable};
49-
pub use task::spawn;
50-
5146
/* Reexported modules */
5247

5348
pub use at_vec;

branches/try2/src/libcore/rt/env.rs

Lines changed: 0 additions & 47 deletions
This file was deleted.

branches/try2/src/libcore/rt/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,3 @@ mod work_queue;
4545
mod stack;
4646
mod context;
4747
mod thread;
48-
pub mod env;

branches/try2/src/libcore/rt/thread_local_storage.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ type pthread_key_t = c_ulong;
4040

4141
#[cfg(target_os="linux")]
4242
#[cfg(target_os="freebsd")]
43-
#[cfg(target_os="android")]
4443
#[allow(non_camel_case_types)] // foreign type
4544
type pthread_key_t = c_uint;
4645

branches/try2/src/libcore/str.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
use at_vec;
2121
use cast;
2222
use char;
23-
use clone::Clone;
2423
use cmp::{Equiv, TotalOrd, Ordering, Less, Equal, Greater};
2524
use libc;
2625
use option::{None, Option, Some};
@@ -2274,7 +2273,6 @@ pub trait StrSlice {
22742273
pure fn to_owned(&self) -> ~str;
22752274
pure fn to_managed(&self) -> @str;
22762275
pure fn char_at(&self, i: uint) -> char;
2277-
fn to_bytes(&self) -> ~[u8];
22782276
}
22792277
22802278
/// Extension methods for strings
@@ -2418,8 +2416,6 @@ impl StrSlice for &self/str {
24182416
24192417
#[inline]
24202418
pure fn char_at(&self, i: uint) -> char { char_at(*self, i) }
2421-
2422-
fn to_bytes(&self) -> ~[u8] { to_bytes(*self) }
24232419
}
24242420
24252421
pub trait OwnedStr {
@@ -2437,13 +2433,6 @@ impl OwnedStr for ~str {
24372433
}
24382434
}
24392435
2440-
impl Clone for ~str {
2441-
#[inline(always)]
2442-
fn clone(&self) -> ~str {
2443-
self.to_str() // hilarious
2444-
}
2445-
}
2446-
24472436
#[cfg(test)]
24482437
mod tests {
24492438
use char;

0 commit comments

Comments
 (0)