Skip to content

Commit 7bc1382

Browse files
committed
---
yaml --- r: 52434 b: refs/heads/dist-snap c: 7de5e6c h: refs/heads/master v: v3
1 parent 51b2e33 commit 7bc1382

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
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: 44d4d6de762f3f9aae1fedcf454c66b79b3ad58d
10-
refs/heads/dist-snap: 499f00de1d4139f07de96a864f2c0d3445946d94
10+
refs/heads/dist-snap: 7de5e6c487c2b3b803c619f8c19ffa8742535e49
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

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

Lines changed: 4 additions & 10 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::LinearMap;
47+
use send_map::linear::LinearSet;
4848
use stackwalk;
4949
use sys;
5050

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

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

@@ -337,13 +331,13 @@ pub fn cleanup_stack_for_failure() {
337331
ptr::null()
338332
};
339333

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

348342
if ptr::is_null(tydesc) {
349343
// FIXME #4420: Destroy this box

branches/dist-snap/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-
impl <T: Hash IterBytes Eq> LinearSet<T> {
488+
pub impl <T: Hash IterBytes Eq> LinearSet<T> {
489489
/// Create an empty LinearSet
490490
static fn new() -> LinearSet<T> { LinearSet{map: LinearMap()} }
491491
}

0 commit comments

Comments
 (0)