Skip to content

Commit d647adb

Browse files
garethgareth
authored andcommitted
---
yaml --- r: 52470 b: refs/heads/dist-snap c: ba2a3e8 h: refs/heads/master v: v3
1 parent 7f59649 commit d647adb

Some content is hidden

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

45 files changed

+439
-524
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: 591eefd740f7abc42777fa60035682fb1887fb21
10+
refs/heads/dist-snap: ba2a3e823493b71933105c458fb7103b8d0d4d77
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/AUTHORS.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ Andrew Dunham <[email protected]>
1515
Andrew Paseltiner <[email protected]>
1616
Arkaitz Jimenez <[email protected]>
1717
Armin Ronacher <[email protected]>
18-
Ashok Gautham <[email protected]>
1918
Austin Seipp <[email protected]>
2019
2120
Ben Alpert <[email protected]>

branches/dist-snap/src/libcargo/cargo.rc

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ use core::*;
5252
use core::dvec::DVec;
5353
use core::io::WriterUtil;
5454
use core::result::{Ok, Err};
55-
use core::hashmap::linear::LinearMap;
55+
use core::send_map::linear::LinearMap;
5656
use std::getopts::{optflag, optopt, opt_present};
5757
use std::map::HashMap;
5858
use std::{map, json, tempfile, term, sort, getopts};
@@ -465,19 +465,19 @@ fn parse_source(name: ~str, j: &json::Json) -> @Source {
465465

466466
match *j {
467467
json::Object(j) => {
468-
let mut url = match j.find_copy(&~"url") {
468+
let mut url = match j.find(&~"url") {
469469
Some(json::String(u)) => u,
470470
_ => fail ~"needed 'url' field in source"
471471
};
472-
let method = match j.find_copy(&~"method") {
472+
let method = match j.find(&~"method") {
473473
Some(json::String(u)) => u,
474474
_ => assume_source_method(url)
475475
};
476-
let key = match j.find_copy(&~"key") {
476+
let key = match j.find(&~"key") {
477477
Some(json::String(u)) => Some(u),
478478
_ => None
479479
};
480-
let keyfp = match j.find_copy(&~"keyfp") {
480+
let keyfp = match j.find(&~"keyfp") {
481481
Some(json::String(u)) => Some(u),
482482
_ => None
483483
};
@@ -512,7 +512,7 @@ fn try_parse_sources(filename: &Path, sources: map::HashMap<~str, @Source>) {
512512
}
513513

514514
fn load_one_source_package(src: @Source, p: &json::Object) {
515-
let name = match p.find_copy(&~"name") {
515+
let name = match p.find(&~"name") {
516516
Some(json::String(n)) => {
517517
if !valid_pkg_name(n) {
518518
warn(~"malformed source json: "
@@ -529,7 +529,7 @@ fn load_one_source_package(src: @Source, p: &json::Object) {
529529
}
530530
};
531531

532-
let uuid = match p.find_copy(&~"uuid") {
532+
let uuid = match p.find(&~"uuid") {
533533
Some(json::String(n)) => {
534534
if !is_uuid(n) {
535535
warn(~"malformed source json: "
@@ -545,15 +545,15 @@ fn load_one_source_package(src: @Source, p: &json::Object) {
545545
}
546546
};
547547

548-
let url = match p.find_copy(&~"url") {
548+
let url = match p.find(&~"url") {
549549
Some(json::String(n)) => n,
550550
_ => {
551551
warn(~"malformed source json: " + src.name + ~" (missing url)");
552552
return;
553553
}
554554
};
555555

556-
let method = match p.find_copy(&~"method") {
556+
let method = match p.find(&~"method") {
557557
Some(json::String(n)) => n,
558558
_ => {
559559
warn(~"malformed source json: "
@@ -562,13 +562,13 @@ fn load_one_source_package(src: @Source, p: &json::Object) {
562562
}
563563
};
564564

565-
let reference = match p.find_copy(&~"ref") {
565+
let reference = match p.find(&~"ref") {
566566
Some(json::String(n)) => Some(n),
567567
_ => None
568568
};
569569

570570
let mut tags = ~[];
571-
match p.find_copy(&~"tags") {
571+
match p.find(&~"tags") {
572572
Some(json::List(js)) => {
573573
for js.each |j| {
574574
match *j {
@@ -580,7 +580,7 @@ fn load_one_source_package(src: @Source, p: &json::Object) {
580580
_ => ()
581581
}
582582

583-
let description = match p.find_copy(&~"description") {
583+
let description = match p.find(&~"description") {
584584
Some(json::String(n)) => n,
585585
_ => {
586586
warn(~"malformed source json: " + src.name

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ pub pure fn from_elem<T: Copy>(n_elts: uint, t: T) -> @[T] {
154154
* Creates and initializes an immutable managed vector by moving all the
155155
* elements from an owned vector.
156156
*/
157-
fn from_owned<T>(v: ~[T]) -> @[T] {
157+
pub fn from_owned<T>(v: ~[T]) -> @[T] {
158158
let mut av = @[];
159159
unsafe {
160160
raw::reserve(&mut av, v.len());
@@ -169,7 +169,7 @@ fn from_owned<T>(v: ~[T]) -> @[T] {
169169
* Creates and initializes an immutable managed vector by copying all the
170170
* elements of a slice.
171171
*/
172-
fn from_slice<T:Copy>(v: &[T]) -> @[T] {
172+
pub fn from_slice<T:Copy>(v: &[T]) -> @[T] {
173173
from_fn(v.len(), |i| v[i])
174174
}
175175

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
#[forbid(deprecated_mode)];
1414
#[forbid(deprecated_pattern)];
1515

16-
use option::Option;
17-
1816
pub trait Container {
1917
/// Return the number of elements in the container
2018
pure fn len(&self) -> uint;
@@ -41,9 +39,6 @@ pub trait Map<K, V>: Mutable {
4139
/// Visit all values
4240
pure fn each_value(&self, f: fn(&V) -> bool);
4341

44-
/// Return the value corresponding to the key in the map
45-
pure fn find(&self, key: &K) -> Option<&self/V>;
46-
4742
/// Insert a key-value pair into the map. An existing value for a
4843
/// key is replaced by the new value. Return true if the key did
4944
/// not already exist in the map.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ pub mod dvec_iter;
138138
pub mod dlist;
139139
#[path="iter-trait.rs"] #[merge = "iter-trait/dlist.rs"]
140140
pub mod dlist_iter;
141-
pub mod hashmap;
141+
pub mod send_map;
142142

143143

144144
/* Tasks and communication */

branches/dist-snap/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 hashmap::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

0 commit comments

Comments
 (0)