Skip to content

Commit 807e8b5

Browse files
---
yaml --- r: 166434 b: refs/heads/batch c: aa37b6d h: refs/heads/master v: v3
1 parent a3c51e7 commit 807e8b5

Some content is hidden

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

65 files changed

+373
-1310
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
2929
refs/heads/issue-18208-method-dispatch-2: 9e1eae4fb9b6527315b4441cf8a0f5ca911d1671
3030
refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3131
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
32-
refs/heads/batch: 3f66223ca650a9bdfb3b564e85639ebfe03677c8
32+
refs/heads/batch: aa37b6dcbb68f6629da2ad8feca7e1af616e6675
3333
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970

branches/batch/mk/cfg/x86_64-unknown-dragonfly.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ CFG_LIB_NAME_x86_64-unknown-dragonfly=lib$(1).so
77
CFG_STATIC_LIB_NAME_x86_64-unknown-dragonfly=lib$(1).a
88
CFG_LIB_GLOB_x86_64-unknown-dragonfly=lib$(1)-*.so
99
CFG_LIB_DSYM_GLOB_x86_64-unknown-dragonfly=$(1)-*.dylib.dSYM
10-
CFG_JEMALLOC_CFLAGS_x86_64-unknown-dragonfly := -m64 -I/usr/include -I/usr/local/include $(CFLAGS)
11-
CFG_GCCISH_CFLAGS_x86_64-unknown-dragonfly := -Wall -Werror -g -fPIC -m64 -I/usr/include -I/usr/local/include $(CFLAGS)
12-
CFG_GCCISH_LINK_FLAGS_x86_64-unknown-dragonfly := -shared -fPIC -g -pthread -lrt -m64
10+
CFG_JEMALLOC_CFLAGS_x86_64-unknown-dragonfly := -I/usr/include -I/usr/local/include $(CFLAGS)
11+
CFG_GCCISH_CFLAGS_x86_64-unknown-dragonfly := -Wall -Werror -g -fPIC -I/usr/include -I/usr/local/include $(CFLAGS)
12+
CFG_GCCISH_LINK_FLAGS_x86_64-unknown-dragonfly := -shared -fPIC -g -pthread -lrt
1313
CFG_GCCISH_DEF_FLAG_x86_64-unknown-dragonfly := -Wl,--export-dynamic,--dynamic-list=
1414
CFG_GCCISH_PRE_LIB_FLAGS_x86_64-unknown-dragonfly := -Wl,-whole-archive
1515
CFG_GCCISH_POST_LIB_FLAGS_x86_64-unknown-dragonfly := -Wl,-no-whole-archive

branches/batch/src/doc/reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ names, and invoked through a consistent syntax: `name!(...)`. Examples include:
640640
* `stringify!` : pretty-print the Rust expression given as an argument
641641
* `include!` : include the Rust expression in the given file
642642
* `include_str!` : include the contents of the given file as a string
643-
* `include_bytes!` : include the contents of the given file as a binary blob
643+
* `include_bin!` : include the contents of the given file as a binary blob
644644
* `error!`, `warn!`, `info!`, `debug!` : provide diagnostic information.
645645

646646
All of the above extensions are expressions with values.

branches/batch/src/etc/snapshot.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ def scrub(b):
3737
"macos": ["bin/rustc"],
3838
"winnt": ["bin/rustc.exe"],
3939
"freebsd": ["bin/rustc"],
40-
"dragonfly": ["bin/rustc"],
4140
}
4241

4342
winnt_runtime_deps_32 = ["libgcc_s_dw2-1.dll",
@@ -87,8 +86,6 @@ def get_kernel(triple):
8786
return "macos"
8887
if os_name == "freebsd":
8988
return "freebsd"
90-
if os_name == "dragonfly":
91-
return "dragonfly"
9289
return "linux"
9390

9491
def get_cpu(triple):

branches/batch/src/libcore/fmt/float.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ use char;
1818
use char::Char;
1919
use fmt;
2020
use iter::{range, DoubleEndedIteratorExt};
21-
use num::{cast, Float, ToPrimitive};
22-
use num::FpCategory as Fp;
21+
use num::{Float, FPNaN, FPInfinite, ToPrimitive};
22+
use num::cast;
2323
use ops::FnOnce;
2424
use result::Result::Ok;
2525
use slice::{mod, SliceExt};
@@ -109,11 +109,11 @@ pub fn float_to_str_bytes_common<T: Float, U, F>(
109109
let _1: T = Float::one();
110110

111111
match num.classify() {
112-
Fp::Nan => return f("NaN".as_bytes()),
113-
Fp::Infinite if num > _0 => {
112+
FPNaN => return f("NaN".as_bytes()),
113+
FPInfinite if num > _0 => {
114114
return f("inf".as_bytes());
115115
}
116-
Fp::Infinite if num < _0 => {
116+
FPInfinite if num < _0 => {
117117
return f("-inf".as_bytes());
118118
}
119119
_ => {}

branches/batch/src/libcore/iter.rs

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -2542,64 +2542,6 @@ impl<A: Int> Iterator<A> for RangeStepInclusive<A> {
25422542
}
25432543
}
25442544

2545-
2546-
/// The `Step` trait identifies objects which can be stepped over in both
2547-
/// directions. The `steps_between` function provides a way to
2548-
/// compare two Step objects (it could be provided using `step()` and `Ord`,
2549-
/// but the implementation would be so inefficient as to be useless).
2550-
#[unstable = "Trait is unstable."]
2551-
pub trait Step: Ord {
2552-
/// Change self to the next object.
2553-
fn step(&mut self);
2554-
/// Change self to the previous object.
2555-
fn step_back(&mut self);
2556-
/// The steps_between two step objects.
2557-
/// a should always be less than b, so the result should never be negative.
2558-
/// Return None if it is not possible to calculate steps_between without
2559-
/// overflow.
2560-
fn steps_between(a: &Self, b: &Self) -> Option<uint>;
2561-
}
2562-
2563-
macro_rules! step_impl {
2564-
($($t:ty)*) => ($(
2565-
#[unstable = "Trait is unstable."]
2566-
impl Step for $t {
2567-
#[inline]
2568-
fn step(&mut self) { *self += 1; }
2569-
#[inline]
2570-
fn step_back(&mut self) { *self -= 1; }
2571-
#[inline]
2572-
fn steps_between(a: &$t, b: &$t) -> Option<uint> {
2573-
debug_assert!(a < b);
2574-
Some((*a - *b) as uint)
2575-
}
2576-
}
2577-
)*)
2578-
}
2579-
2580-
macro_rules! step_impl_no_between {
2581-
($($t:ty)*) => ($(
2582-
#[unstable = "Trait is unstable."]
2583-
impl Step for $t {
2584-
#[inline]
2585-
fn step(&mut self) { *self += 1; }
2586-
#[inline]
2587-
fn step_back(&mut self) { *self -= 1; }
2588-
#[inline]
2589-
fn steps_between(_a: &$t, _b: &$t) -> Option<uint> {
2590-
None
2591-
}
2592-
}
2593-
)*)
2594-
}
2595-
2596-
step_impl!(uint u8 u16 u32 int i8 i16 i32);
2597-
#[cfg(target_word_size = "64")]
2598-
step_impl!(u64 i64);
2599-
#[cfg(target_word_size = "32")]
2600-
step_impl_no_between!(u64 i64);
2601-
2602-
26032545
/// An iterator that repeats an element endlessly
26042546
#[deriving(Clone)]
26052547
#[stable]

branches/batch/src/libcore/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
#![allow(unknown_features, raw_pointer_deriving)]
6060
#![feature(globs, intrinsics, lang_items, macro_rules, phase)]
6161
#![feature(simd, unsafe_destructor, slicing_syntax)]
62-
#![feature(default_type_params, unboxed_closures, associated_types)]
62+
#![feature(default_type_params, unboxed_closures)]
6363
#![deny(missing_docs)]
6464

6565
mod macros;

branches/batch/src/libcore/num/f32.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818

1919
use intrinsics;
2020
use mem;
21-
use num::Float;
22-
use num::FpCategory as Fp;
21+
use num::{Float, FPNormal, FPCategory, FPZero, FPSubnormal, FPInfinite, FPNaN};
2322
use num::from_str_radix;
2423
use option::Option;
2524

@@ -157,23 +156,23 @@ impl Float for f32 {
157156
/// Returns `true` if the number is neither zero, infinite, subnormal or NaN.
158157
#[inline]
159158
fn is_normal(self) -> bool {
160-
self.classify() == Fp::Normal
159+
self.classify() == FPNormal
161160
}
162161

163162
/// Returns the floating point category of the number. If only one property
164163
/// is going to be tested, it is generally faster to use the specific
165164
/// predicate instead.
166-
fn classify(self) -> Fp {
165+
fn classify(self) -> FPCategory {
167166
const EXP_MASK: u32 = 0x7f800000;
168167
const MAN_MASK: u32 = 0x007fffff;
169168

170169
let bits: u32 = unsafe { mem::transmute(self) };
171170
match (bits & MAN_MASK, bits & EXP_MASK) {
172-
(0, 0) => Fp::Zero,
173-
(_, 0) => Fp::Subnormal,
174-
(0, EXP_MASK) => Fp::Infinite,
175-
(_, EXP_MASK) => Fp::Nan,
176-
_ => Fp::Normal,
171+
(0, 0) => FPZero,
172+
(_, 0) => FPSubnormal,
173+
(0, EXP_MASK) => FPInfinite,
174+
(_, EXP_MASK) => FPNaN,
175+
_ => FPNormal,
177176
}
178177
}
179178

branches/batch/src/libcore/num/f64.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818

1919
use intrinsics;
2020
use mem;
21-
use num::Float;
22-
use num::FpCategory as Fp;
21+
use num::{Float, FPNormal, FPCategory, FPZero, FPSubnormal, FPInfinite, FPNaN};
2322
use num::from_str_radix;
2423
use option::Option;
2524

@@ -165,23 +164,23 @@ impl Float for f64 {
165164
/// Returns `true` if the number is neither zero, infinite, subnormal or NaN.
166165
#[inline]
167166
fn is_normal(self) -> bool {
168-
self.classify() == Fp::Normal
167+
self.classify() == FPNormal
169168
}
170169

171170
/// Returns the floating point category of the number. If only one property
172171
/// is going to be tested, it is generally faster to use the specific
173172
/// predicate instead.
174-
fn classify(self) -> Fp {
173+
fn classify(self) -> FPCategory {
175174
const EXP_MASK: u64 = 0x7ff0000000000000;
176175
const MAN_MASK: u64 = 0x000fffffffffffff;
177176

178177
let bits: u64 = unsafe { mem::transmute(self) };
179178
match (bits & MAN_MASK, bits & EXP_MASK) {
180-
(0, 0) => Fp::Zero,
181-
(_, 0) => Fp::Subnormal,
182-
(0, EXP_MASK) => Fp::Infinite,
183-
(_, EXP_MASK) => Fp::Nan,
184-
_ => Fp::Normal,
179+
(0, 0) => FPZero,
180+
(_, 0) => FPSubnormal,
181+
(0, EXP_MASK) => FPInfinite,
182+
(_, EXP_MASK) => FPNaN,
183+
_ => FPNormal,
185184
}
186185
}
187186

branches/batch/src/libcore/num/mod.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
#![stable]
1616
#![allow(missing_docs)]
1717

18+
pub use self::FPCategory::*;
19+
1820
use {int, i8, i16, i32, i64};
1921
use {uint, u8, u16, u32, u64};
2022
use {f32, f64};
@@ -1220,17 +1222,17 @@ impl_num_cast! { f64, to_f64 }
12201222
/// Used for representing the classification of floating point numbers
12211223
#[deriving(Copy, PartialEq, Show)]
12221224
#[unstable = "may be renamed"]
1223-
pub enum FpCategory {
1225+
pub enum FPCategory {
12241226
/// "Not a Number", often obtained by dividing by zero
1225-
Nan,
1227+
FPNaN,
12261228
/// Positive or negative infinity
1227-
Infinite ,
1229+
FPInfinite ,
12281230
/// Positive or negative zero
1229-
Zero,
1230-
/// De-normalized floating point representation (less precise than `Normal`)
1231-
Subnormal,
1231+
FPZero,
1232+
/// De-normalized floating point representation (less precise than `FPNormal`)
1233+
FPSubnormal,
12321234
/// A regular floating point number
1233-
Normal,
1235+
FPNormal,
12341236
}
12351237

12361238
/// A built-in floating point number.
@@ -1275,7 +1277,7 @@ pub trait Float
12751277
/// Returns true if this number is neither zero, infinite, denormal, or NaN.
12761278
fn is_normal(self) -> bool;
12771279
/// Returns the category that this number falls into.
1278-
fn classify(self) -> FpCategory;
1280+
fn classify(self) -> FPCategory;
12791281

12801282
// FIXME (#5527): These should be associated constants
12811283

branches/batch/src/libcore/ops.rs

Lines changed: 0 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,7 @@
5151
//! See the documentation for each trait for a minimum implementation that prints
5252
//! something to the screen.
5353
54-
use clone::Clone;
55-
use iter::{Step, Iterator,DoubleEndedIterator,ExactSizeIterator};
5654
use kinds::Sized;
57-
use option::Option::{mod, Some, None};
5855

5956
/// The `Drop` trait is used to run some code when a value goes out of scope. This
6057
/// is sometimes called a 'destructor'.
@@ -836,79 +833,6 @@ pub trait SliceMut<Sized? Idx, Sized? Result> for Sized? {
836833
fn slice_or_fail_mut<'a>(&'a mut self, from: &Idx, to: &Idx) -> &'a mut Result;
837834
}
838835

839-
840-
/// An unbounded range.
841-
#[deriving(Copy)]
842-
#[lang="full_range"]
843-
pub struct FullRange;
844-
845-
/// A (half-open) range which is bounded at both ends.
846-
#[deriving(Copy)]
847-
#[lang="range"]
848-
pub struct Range<Idx> {
849-
/// The lower bound of the range (inclusive).
850-
pub start: Idx,
851-
/// The upper bound of the range (exclusive).
852-
pub end: Idx,
853-
}
854-
855-
// FIXME(#19391) needs a snapshot
856-
//impl<Idx: Clone + Step<T=uint>> Iterator<Idx> for Range<Idx> {
857-
impl<Idx: Clone + Step> Iterator<Idx> for Range<Idx> {
858-
#[inline]
859-
fn next(&mut self) -> Option<Idx> {
860-
if self.start < self.end {
861-
let result = self.start.clone();
862-
self.start.step();
863-
return Some(result);
864-
}
865-
866-
return None;
867-
}
868-
869-
#[inline]
870-
fn size_hint(&self) -> (uint, Option<uint>) {
871-
if let Some(hint) = Step::steps_between(&self.end, &self.start) {
872-
(hint, Some(hint))
873-
} else {
874-
(0, None)
875-
}
876-
}
877-
}
878-
879-
impl<Idx: Clone + Step> DoubleEndedIterator<Idx> for Range<Idx> {
880-
#[inline]
881-
fn next_back(&mut self) -> Option<Idx> {
882-
if self.start < self.end {
883-
self.end.step_back();
884-
return Some(self.end.clone());
885-
}
886-
887-
return None;
888-
}
889-
}
890-
891-
impl<Idx: Clone + Step> ExactSizeIterator<Idx> for Range<Idx> {}
892-
893-
/// A range which is only bounded below.
894-
#[deriving(Copy)]
895-
#[lang="range_from"]
896-
pub struct RangeFrom<Idx> {
897-
/// The lower bound of the range (inclusive).
898-
pub start: Idx,
899-
}
900-
901-
impl<Idx: Clone + Step> Iterator<Idx> for RangeFrom<Idx> {
902-
#[inline]
903-
fn next(&mut self) -> Option<Idx> {
904-
// Deliberately overflow so we loop forever.
905-
let result = self.start.clone();
906-
self.start.step();
907-
return Some(result);
908-
}
909-
}
910-
911-
912836
/// The `Deref` trait is used to specify the functionality of dereferencing
913837
/// operations like `*v`.
914838
///

0 commit comments

Comments
 (0)