Skip to content

Commit 76a7dfe

Browse files
committed
---
yaml --- r: 59070 b: refs/heads/incoming c: 1e241ce h: refs/heads/master v: v3
1 parent 8174212 commit 76a7dfe

File tree

142 files changed

+901
-3769
lines changed

Some content is hidden

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

142 files changed

+901
-3769
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: c50a9d5b664478e533ba1d1d353213d70c8ad589
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/incoming: 4958e9b4b632b67050dc4de6df1f97329292dfbc
9+
refs/heads/incoming: 1e241ce52bbba72e1641f44f83ced0bfea4717f9
1010
refs/heads/dist-snap: 00dbbd01c2aee72982b3e0f9511ae1d4428c3ba9
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/mk/platform.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,12 +247,12 @@ AR_mips-unknown-linux-gnu=mips-linux-gnu-ar
247247
CFG_LIB_NAME_mips-unknown-linux-gnu=lib$(1).so
248248
CFG_LIB_GLOB_mips-unknown-linux-gnu=lib$(1)-*.so
249249
CFG_LIB_DSYM_GLOB_mips-unknown-linux-gnu=lib$(1)-*.dylib.dSYM
250-
CFG_GCCISH_CFLAGS_mips-unknown-linux-gnu := -Wall -g -fPIC -mips32r2 -msoft-float -mabi=32 -mno-compact-eh
250+
CFG_GCCISH_CFLAGS_mips-unknown-linux-gnu := -Wall -g -fPIC -mips32r2 -msoft-float -mabi=32
251251
CFG_GCCISH_CXXFLAGS_mips-unknown-linux-gnu := -fno-rtti
252252
CFG_GCCISH_LINK_FLAGS_mips-unknown-linux-gnu := -shared -fPIC -g -mips32r2 -msoft-float -mabi=32
253253
CFG_GCCISH_DEF_FLAG_mips-unknown-linux-gnu := -Wl,--export-dynamic,--dynamic-list=
254254
CFG_GCCISH_PRE_LIB_FLAGS_mips-unknown-linux-gnu := -Wl,-whole-archive
255-
CFG_GCCISH_POST_LIB_FLAGS_mips-unknown-linux-gnu := -Wl,-no-whole-archive
255+
CFG_GCCISH_POST_LIB_FLAGS_mips-unknown-linux-gnu := -Wl,-no-whole-archive -Wl,-znoexecstack
256256
CFG_DEF_SUFFIX_mips-unknown-linux-gnu := .linux.def
257257
CFG_INSTALL_NAME_mips-unknown-linux-gnu =
258258
CFG_LIBUV_LINK_FLAGS_mips-unknown-linux-gnu =

branches/incoming/src/libcore/cleanup.rs

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ struct AnnihilateStats {
127127
n_bytes_freed: uint
128128
}
129129

130-
#[cfg(stage0)]
131130
unsafe fn each_live_alloc(read_next_before: bool,
132131
f: &fn(box: *mut BoxRepr, uniq: bool) -> bool) {
133132
//! Walks the internal list of allocations
@@ -142,8 +141,8 @@ unsafe fn each_live_alloc(read_next_before: bool,
142141
let uniq =
143142
(*box).header.ref_count == managed::raw::RC_MANAGED_UNIQUE;
144143

145-
if !f(box, uniq) {
146-
return;
144+
if ! f(box, uniq) {
145+
break
147146
}
148147

149148
if read_next_before {
@@ -153,33 +152,6 @@ unsafe fn each_live_alloc(read_next_before: bool,
153152
}
154153
}
155154
}
156-
#[cfg(not(stage0))]
157-
unsafe fn each_live_alloc(read_next_before: bool,
158-
f: &fn(box: *mut BoxRepr, uniq: bool) -> bool) -> bool {
159-
//! Walks the internal list of allocations
160-
161-
use managed;
162-
163-
let task: *Task = transmute(rustrt::rust_get_task());
164-
let box = (*task).boxed_region.live_allocs;
165-
let mut box: *mut BoxRepr = transmute(copy box);
166-
while box != mut_null() {
167-
let next_before = transmute(copy (*box).header.next);
168-
let uniq =
169-
(*box).header.ref_count == managed::raw::RC_MANAGED_UNIQUE;
170-
171-
if !f(box, uniq) {
172-
return false;
173-
}
174-
175-
if read_next_before {
176-
box = next_before;
177-
} else {
178-
box = transmute(copy (*box).header.next);
179-
}
180-
}
181-
return true;
182-
}
183155

184156
#[cfg(unix)]
185157
fn debug_mem() -> bool {

branches/incoming/src/libcore/condition.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
use prelude::*;
1414
use task;
15-
use local_data::{local_data_pop, local_data_set};
15+
use task::local_data::{local_data_pop, local_data_set};
1616

1717
// helper for transmutation, shown below.
1818
type RustClosure = (int, int);
@@ -24,14 +24,14 @@ pub struct Handler<T, U> {
2424

2525
pub struct Condition<'self, T, U> {
2626
name: &'static str,
27-
key: local_data::LocalDataKey<'self, Handler<T, U>>
27+
key: task::local_data::LocalDataKey<'self, Handler<T, U>>
2828
}
2929

3030
pub impl<'self, T, U> Condition<'self, T, U> {
3131
fn trap(&'self self, h: &'self fn(T) -> U) -> Trap<'self, T, U> {
3232
unsafe {
3333
let p : *RustClosure = ::cast::transmute(&h);
34-
let prev = local_data::local_data_get(self.key);
34+
let prev = task::local_data::local_data_get(self.key);
3535
let h = @Handler { handle: *p, prev: prev };
3636
Trap { cond: self, handler: h }
3737
}

branches/incoming/src/libcore/container.rs

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -30,32 +30,16 @@ pub trait Map<K, V>: Mutable {
3030
fn contains_key(&self, key: &K) -> bool;
3131

3232
// Visits all keys and values
33-
#[cfg(stage0)]
3433
fn each<'a>(&'a self, f: &fn(&K, &'a V) -> bool);
35-
// Visits all keys and values
36-
#[cfg(not(stage0))]
37-
fn each<'a>(&'a self, f: &fn(&K, &'a V) -> bool) -> bool;
3834

3935
/// Visit all keys
40-
#[cfg(stage0)]
4136
fn each_key(&self, f: &fn(&K) -> bool);
42-
/// Visit all keys
43-
#[cfg(not(stage0))]
44-
fn each_key(&self, f: &fn(&K) -> bool) -> bool;
4537

4638
/// Visit all values
47-
#[cfg(stage0)]
4839
fn each_value<'a>(&'a self, f: &fn(&'a V) -> bool);
49-
/// Visit all values
50-
#[cfg(not(stage0))]
51-
fn each_value<'a>(&'a self, f: &fn(&'a V) -> bool) -> bool;
5240

5341
/// Iterate over the map and mutate the contained values
54-
#[cfg(stage0)]
5542
fn mutate_values(&mut self, f: &fn(&K, &mut V) -> bool);
56-
/// Iterate over the map and mutate the contained values
57-
#[cfg(not(stage0))]
58-
fn mutate_values(&mut self, f: &fn(&K, &mut V) -> bool) -> bool;
5943

6044
/// Return a reference to the value corresponding to the key
6145
fn find<'a>(&'a self, key: &K) -> Option<&'a V>;
@@ -81,7 +65,6 @@ pub trait Map<K, V>: Mutable {
8165
fn pop(&mut self, k: &K) -> Option<V>;
8266
}
8367

84-
#[cfg(stage0)]
8568
pub trait Set<T>: Mutable {
8669
/// Return true if the set contains a value
8770
fn contains(&self, value: &T) -> bool;
@@ -116,39 +99,3 @@ pub trait Set<T>: Mutable {
11699
/// Visit the values representing the union
117100
fn union(&self, other: &Self, f: &fn(&T) -> bool);
118101
}
119-
120-
#[cfg(not(stage0))]
121-
pub trait Set<T>: Mutable {
122-
/// Return true if the set contains a value
123-
fn contains(&self, value: &T) -> bool;
124-
125-
/// Add a value to the set. Return true if the value was not already
126-
/// present in the set.
127-
fn insert(&mut self, value: T) -> bool;
128-
129-
/// Remove a value from the set. Return true if the value was
130-
/// present in the set.
131-
fn remove(&mut self, value: &T) -> bool;
132-
133-
/// Return true if the set has no elements in common with `other`.
134-
/// This is equivalent to checking for an empty intersection.
135-
fn is_disjoint(&self, other: &Self) -> bool;
136-
137-
/// Return true if the set is a subset of another
138-
fn is_subset(&self, other: &Self) -> bool;
139-
140-
/// Return true if the set is a superset of another
141-
fn is_superset(&self, other: &Self) -> bool;
142-
143-
/// Visit the values representing the difference
144-
fn difference(&self, other: &Self, f: &fn(&T) -> bool) -> bool;
145-
146-
/// Visit the values representing the symmetric difference
147-
fn symmetric_difference(&self, other: &Self, f: &fn(&T) -> bool) -> bool;
148-
149-
/// Visit the values representing the intersection
150-
fn intersection(&self, other: &Self, f: &fn(&T) -> bool) -> bool;
151-
152-
/// Visit the values representing the union
153-
fn union(&self, other: &Self, f: &fn(&T) -> bool) -> bool;
154-
}

branches/incoming/src/libcore/core.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,6 @@ pub mod trie;
215215
pub mod task;
216216
pub mod comm;
217217
pub mod pipes;
218-
pub mod local_data;
219218

220219

221220
/* Runtime and platform support */
@@ -228,6 +227,7 @@ pub mod rand;
228227
pub mod run;
229228
pub mod sys;
230229
pub mod cast;
230+
pub mod flate;
231231
pub mod repr;
232232
pub mod cleanup;
233233
pub mod reflect;

branches/incoming/src/libstd/flate.rs renamed to branches/incoming/src/libcore/flate.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ Simple compression
1515
*/
1616

1717
use libc;
18-
use core::libc::{c_void, size_t, c_int};
18+
use libc::{c_void, size_t, c_int};
1919
use vec;
2020

21-
#[cfg(test)] use core::rand;
22-
#[cfg(test)] use core::rand::RngUtil;
21+
#[cfg(test)] use rand;
22+
#[cfg(test)] use rand::RngUtil;
2323

2424
pub mod rustrt {
25-
use core::libc::{c_int, c_void, size_t};
25+
use libc::{c_int, c_void, size_t};
2626

2727
#[link_name = "rustrt"]
2828
pub extern {

branches/incoming/src/libcore/gc.rs

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ type Visitor<'self> = &'self fn(root: **Word, tydesc: *Word) -> bool;
129129

130130
// Walks the list of roots for the given safe point, and calls visitor
131131
// on each root.
132-
unsafe fn _walk_safe_point(fp: *Word, sp: SafePoint, visitor: Visitor) -> bool {
132+
unsafe fn walk_safe_point(fp: *Word, sp: SafePoint, visitor: Visitor) {
133133
let fp_bytes: *u8 = cast::transmute(fp);
134134
let sp_meta: *u32 = cast::transmute(sp.sp_meta);
135135

@@ -155,7 +155,7 @@ unsafe fn _walk_safe_point(fp: *Word, sp: SafePoint, visitor: Visitor) -> bool {
155155
} else {
156156
ptr::null()
157157
};
158-
if !visitor(root, tydesc) { return false; }
158+
if !visitor(root, tydesc) { return; }
159159
}
160160
sri += 1;
161161
}
@@ -168,16 +168,6 @@ unsafe fn _walk_safe_point(fp: *Word, sp: SafePoint, visitor: Visitor) -> bool {
168168
}
169169
rri += 1;
170170
}
171-
return true;
172-
}
173-
174-
#[cfg(stage0)]
175-
unsafe fn walk_safe_point(fp: *Word, sp: SafePoint, visitor: Visitor) {
176-
_walk_safe_point(fp, sp, visitor);
177-
}
178-
#[cfg(not(stage0))]
179-
unsafe fn walk_safe_point(fp: *Word, sp: SafePoint, visitor: Visitor) -> bool {
180-
_walk_safe_point(fp, sp, visitor)
181171
}
182172

183173
// Is fp contained in segment?
@@ -232,7 +222,7 @@ static need_cleanup: Memory = exchange_heap | stack;
232222

233223
// Walks stack, searching for roots of the requested type, and passes
234224
// each root to the visitor.
235-
unsafe fn _walk_gc_roots(mem: Memory, sentinel: **Word, visitor: Visitor) -> bool {
225+
unsafe fn walk_gc_roots(mem: Memory, sentinel: **Word, visitor: Visitor) {
236226
let mut segment = rustrt::rust_get_stack_segment();
237227
let mut last_ret: *Word = ptr::null();
238228
// To avoid collecting memory used by the GC itself, skip stack
@@ -284,14 +274,14 @@ unsafe fn _walk_gc_roots(mem: Memory, sentinel: **Word, visitor: Visitor) -> boo
284274
// Root is a generic box.
285275
let refcount = **root;
286276
if mem | task_local_heap != 0 && refcount != -1 {
287-
if !visitor(root, tydesc) { return false; }
277+
if !visitor(root, tydesc) { return; }
288278
} else if mem | exchange_heap != 0 && refcount == -1 {
289-
if !visitor(root, tydesc) { return false; }
279+
if !visitor(root, tydesc) { return; }
290280
}
291281
} else {
292282
// Root is a non-immediate.
293283
if mem | stack != 0 {
294-
if !visitor(root, tydesc) { return false; }
284+
if !visitor(root, tydesc) { return; }
295285
}
296286
}
297287
}
@@ -300,17 +290,8 @@ unsafe fn _walk_gc_roots(mem: Memory, sentinel: **Word, visitor: Visitor) -> boo
300290
}
301291
reached_sentinel = delay_reached_sentinel;
302292
}
303-
return true;
304293
}
305294

306-
#[cfg(stage0)]
307-
unsafe fn walk_gc_roots(mem: Memory, sentinel: **Word, visitor: Visitor) {
308-
_walk_gc_roots(mem, sentinel, visitor);
309-
}
310-
#[cfg(not(stage0))]
311-
unsafe fn walk_gc_roots(mem: Memory, sentinel: **Word, visitor: Visitor) -> bool {
312-
_walk_gc_roots(mem, sentinel, visitor)
313-
}
314295
pub fn gc() {
315296
unsafe {
316297
// Abort when GC is disabled.

0 commit comments

Comments
 (0)