Skip to content

Commit 2ac010e

Browse files
committed
---
yaml --- r: 41888 b: refs/heads/master c: e31ebea h: refs/heads/master v: v3
1 parent 214eefd commit 2ac010e

File tree

5 files changed

+17
-10
lines changed

5 files changed

+17
-10
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 8cff5c22c3d4354a2058b7c3e7ddd6d263bf8190
2+
refs/heads/master: e31ebeadc1ad0e38cc726e6b4a6c990498c5e10b
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 2f46b763da2c098913884f101b6d71d69af41b49
55
refs/heads/try: 3d5418789064fdb463e872a4e651af1c628a3650

trunk/src/libcore/gc.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ use io;
4444
use libc::{size_t, uintptr_t};
4545
use option::{None, Option, Some};
4646
use ptr;
47-
use send_map::linear::LinearSet;
47+
use send_map::linear::LinearMap;
4848
use stackwalk;
4949
use sys;
5050

@@ -294,6 +294,12 @@ pub fn gc() {
294294
}
295295
}
296296

297+
type RootSet = LinearMap<*Word,()>;
298+
299+
fn RootSet() -> RootSet {
300+
LinearMap()
301+
}
302+
297303
#[cfg(gc)]
298304
fn expect_sentinel() -> bool { true }
299305

@@ -331,13 +337,13 @@ pub fn cleanup_stack_for_failure() {
331337
ptr::null()
332338
};
333339

334-
let mut roots = LinearSet::new();
340+
let mut roots = ~RootSet();
335341
for walk_gc_roots(need_cleanup, sentinel) |root, tydesc| {
336342
// Track roots to avoid double frees.
337-
if roots.contains(&*root) {
343+
if roots.find(&*root).is_some() {
338344
loop;
339345
}
340-
roots.insert(*root);
346+
roots.insert(*root, ());
341347

342348
if ptr::is_null(tydesc) {
343349
// FIXME #4420: Destroy this box

trunk/src/libcore/send_map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ pub mod linear {
485485
fn remove(&mut self, value: &T) -> bool { self.map.remove(value) }
486486
}
487487

488-
pub impl <T: Hash IterBytes Eq> LinearSet<T> {
488+
impl <T: Hash IterBytes Eq> LinearSet<T> {
489489
/// Create an empty LinearSet
490490
static fn new() -> LinearSet<T> { LinearSet{map: LinearMap()} }
491491
}

trunk/src/libcore/task/spawn.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,21 +96,21 @@ macro_rules! move_it (
9696
{ $x:expr } => ( unsafe { let y = move *ptr::addr_of(&($x)); move y } )
9797
)
9898

99-
type TaskSet = send_map::linear::LinearSet<*rust_task>;
99+
type TaskSet = send_map::linear::LinearMap<*rust_task,()>;
100100

101101
fn new_taskset() -> TaskSet {
102-
send_map::linear::LinearSet::new()
102+
send_map::linear::LinearMap()
103103
}
104104
fn taskset_insert(tasks: &mut TaskSet, task: *rust_task) {
105-
let didnt_overwrite = tasks.insert(task);
105+
let didnt_overwrite = tasks.insert(task, ());
106106
assert didnt_overwrite;
107107
}
108108
fn taskset_remove(tasks: &mut TaskSet, task: *rust_task) {
109109
let was_present = tasks.remove(&task);
110110
assert was_present;
111111
}
112112
pub fn taskset_each(tasks: &TaskSet, blk: fn(v: *rust_task) -> bool) {
113-
tasks.each(|k| blk(*k))
113+
tasks.each_key(|k| blk(*k))
114114
}
115115

116116
// One of these per group of linked-failure tasks.

trunk/src/libstd/time.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,6 +1025,7 @@ mod tests {
10251025
}
10261026

10271027
#[test]
1028+
#[ignore(reason = "randomred")]
10281029
fn test_strptime() {
10291030
os::setenv(~"TZ", ~"America/Los_Angeles");
10301031
tzset();

0 commit comments

Comments
 (0)