Skip to content

Commit a0b37cd

Browse files
committed
---
yaml --- r: 52468 b: refs/heads/dist-snap c: 988ce71 h: refs/heads/master v: v3
1 parent d526974 commit a0b37cd

Some content is hidden

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

62 files changed

+275
-550
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: d77f8d55542bd0649031b8ccc45f5a7a3a4fbd07
10+
refs/heads/dist-snap: 988ce7180d998b969c08286b083b73bd5be623bc
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
@@ -26,7 +26,6 @@ Benjamin Jackman <[email protected]>
2626
Benjamin Kircher <[email protected]>
2727
Benjamin Peterson <[email protected]>
2828
Bilal Husain <[email protected]>
29-
Bill Fallon <[email protected]>
3029
Brendan Eich <[email protected]>
3130
Brian Anderson <[email protected]>
3231
Brian J. Burg <[email protected]>

branches/dist-snap/doc/rust.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3018,11 +3018,6 @@ Local variables are immutable unless declared with `let mut`. The
30183018
declaration (so `let mut x, y` declares two mutable variables, `x` and
30193019
`y`).
30203020

3021-
Function parameters are immutable unless declared with `mut`. The
3022-
`mut` keyword applies only to the following parameter (so `|mut x, y|`
3023-
and `fn f(mut x: ~int, y: ~int)` declare one mutable variable `x` and
3024-
one immutable variable `y`).
3025-
30263021
Local variables are not initialized when allocated; the entire frame worth of
30273022
local variables are allocated at once, on frame-entry, in an uninitialized
30283023
state. Subsequent statements within a function may or may not initialize the

branches/dist-snap/src/compiletest/runtest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ fn check_expected_errors(expected_errors: ~[errors::expected_error],
273273
procres: procres) {
274274

275275
// true if we found the error in question
276-
let found_flags = vec::cast_to_mut(vec::from_elem(
276+
let found_flags = vec::to_mut(vec::from_elem(
277277
vec::len(expected_errors), false));
278278

279279
if procres.status == 0 {

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::send_map::linear::LinearMap;
55+
use core::hashmap::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(&~"url") {
468+
let mut url = match j.find_copy(&~"url") {
469469
Some(json::String(u)) => u,
470470
_ => fail ~"needed 'url' field in source"
471471
};
472-
let method = match j.find(&~"method") {
472+
let method = match j.find_copy(&~"method") {
473473
Some(json::String(u)) => u,
474474
_ => assume_source_method(url)
475475
};
476-
let key = match j.find(&~"key") {
476+
let key = match j.find_copy(&~"key") {
477477
Some(json::String(u)) => Some(u),
478478
_ => None
479479
};
480-
let keyfp = match j.find(&~"keyfp") {
480+
let keyfp = match j.find_copy(&~"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(&~"name") {
515+
let name = match p.find_copy(&~"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(&~"uuid") {
532+
let uuid = match p.find_copy(&~"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(&~"url") {
548+
let url = match p.find_copy(&~"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(&~"method") {
556+
let method = match p.find_copy(&~"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(&~"ref") {
565+
let reference = match p.find_copy(&~"ref") {
566566
Some(json::String(n)) => Some(n),
567567
_ => None
568568
};
569569

570570
let mut tags = ~[];
571-
match p.find(&~"tags") {
571+
match p.find_copy(&~"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(&~"description") {
583+
let description = match p.find_copy(&~"description") {
584584
Some(json::String(n)) => n,
585585
_ => {
586586
warn(~"malformed source json: " + src.name

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

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

16+
use option::Option;
17+
1618
pub trait Container {
1719
/// Return the number of elements in the container
1820
pure fn len(&self) -> uint;
@@ -39,6 +41,9 @@ pub trait Map<K, V>: Mutable {
3941
/// Visit all values
4042
pure fn each_value(&self, f: fn(&V) -> bool);
4143

44+
/// Return the value corresponding to the key in the map
45+
pure fn find(&self, key: &K) -> Option<&self/V>;
46+
4247
/// Insert a key-value pair into the map. An existing value for a
4348
/// key is replaced by the new value. Return true if the key did
4449
/// 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 send_map;
141+
pub mod hashmap;
142142

143143

144144
/* Tasks and communication */

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ impl<A> DVec<A> {
145145
#[inline(always)]
146146
fn swap_mut(f: &fn(v: ~[mut A]) -> ~[mut A]) {
147147
do self.swap |v| {
148-
vec::cast_from_mut(f(vec::cast_to_mut(move v)))
148+
vec::from_mut(f(vec::to_mut(move v)))
149149
}
150150
}
151151

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

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ delegate!(fn exp2(n: c_float) -> c_float = cmath::c_float_utils::exp2)
5656
delegate!(fn abs(n: c_float) -> c_float = cmath::c_float_utils::abs)
5757
delegate!(fn abs_sub(a: c_float, b: c_float) -> c_float =
5858
cmath::c_float_utils::abs_sub)
59+
delegate!(fn floor(n: c_float) -> c_float = cmath::c_float_utils::floor)
5960
delegate!(fn mul_add(a: c_float, b: c_float, c: c_float) -> c_float =
6061
cmath::c_float_utils::mul_add)
6162
delegate!(fn fmax(a: c_float, b: c_float) -> c_float =
@@ -140,10 +141,6 @@ pub pure fn ge(x: f32, y: f32) -> bool { return x >= y; }
140141
#[inline(always)]
141142
pub pure fn gt(x: f32, y: f32) -> bool { return x > y; }
142143

143-
/// Returns `x` rounded down
144-
#[inline(always)]
145-
pub pure fn floor(x: f32) -> f32 { unsafe { floorf32(x) } }
146-
147144
// FIXME (#1999): replace the predicates below with llvm intrinsics or
148145
// calls to the libmath macros in the rust runtime for performance.
149146

@@ -301,11 +298,6 @@ impl f32: num::One {
301298
static pure fn one() -> f32 { 1.0 }
302299
}
303300

304-
#[abi="rust-intrinsic"]
305-
pub extern {
306-
fn floorf32(val: f32) -> f32;
307-
}
308-
309301
//
310302
// Local Variables:
311303
// mode: rust

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

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ delegate!(fn exp2(n: c_double) -> c_double = cmath::c_double_utils::exp2)
5757
delegate!(fn abs(n: c_double) -> c_double = cmath::c_double_utils::abs)
5858
delegate!(fn abs_sub(a: c_double, b: c_double) -> c_double =
5959
cmath::c_double_utils::abs_sub)
60+
delegate!(fn floor(n: c_double) -> c_double = cmath::c_double_utils::floor)
6061
delegate!(fn mul_add(a: c_double, b: c_double, c: c_double) -> c_double =
6162
cmath::c_double_utils::mul_add)
6263
delegate!(fn fmax(a: c_double, b: c_double) -> c_double =
@@ -209,16 +210,12 @@ pub pure fn is_infinite(x: f64) -> bool {
209210
return x == infinity || x == neg_infinity;
210211
}
211212

212-
/// Returns true if `x` is a finite number
213+
/// Returns true if `x`is a finite number
213214
#[inline(always)]
214215
pub pure fn is_finite(x: f64) -> bool {
215216
return !(is_NaN(x) || is_infinite(x));
216217
}
217218

218-
/// Returns `x` rounded down
219-
#[inline(always)]
220-
pub pure fn floor(x: f64) -> f64 { unsafe { floorf64(x) } }
221-
222219
// FIXME (#1999): add is_normal, is_subnormal, and fpclassify
223220

224221
/* Module: consts */
@@ -325,11 +322,6 @@ impl f64: num::One {
325322
static pure fn one() -> f64 { 1.0 }
326323
}
327324

328-
#[abi="rust-intrinsic"]
329-
pub extern {
330-
fn floorf64(val: f64) -> f64;
331-
}
332-
333325
//
334326
// Local Variables:
335327
// mode: rust

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

Lines changed: 1 addition & 1 deletion
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 hashmap::linear::LinearSet;
4848
use stackwalk;
4949
use sys;
5050

0 commit comments

Comments
 (0)